I'm using NinjaKit in Safari (Same as Greasemonkey). The codes are like this
// ==UserScript==
// @name demo
// @namespace http://dailymed.nlm.nih.gov/
// @include http://dailymed.nlm.nih.gov/dailymed/*
// @require http://code.jquery.com/jquery-1.11.0.min.js
// @require http://johannburkard.de/resources/Johann/jquery.highlight-4.closure.js
// ==/UserScript==
$(document).ready(function () {
document.title = 'Hello!' + document.title;
alert("ZaiJian");
$("body p").highlight(["a"]);
});
When I visit this page, the alert
can be displayed well, but the .highlight
function which depends on jQuery.highlight
and jQuery
doesn't work. It says:
TypeError: 'undefined' is not a function (evaluating 'c.toUpperCase()')
And I find it quite hard to debug this.. Does anyone have ideas about it?