
Untitled
By: a guest on
Sep 13th, 2012 | syntax:
None | size: 0.91 KB | hits: 10 | expires: Never
// ==UserScript==
// @name user.js template
// @namespace http://hoge.co.jp/
// @include http://foo.com/*
// @exclude
// @author xorphitus
// @description this is a template of user script
// @version 0.0.1
// ==/UserScript==
(function () {
'use strict';
var main = function () {
// TODO
};
if (jQuery) {
main();
} else {
(function (callback) {
var script = document.createElement('script');
script.setAttribute('src', 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js');
script.addEventListener('load', function () {
var script = document.createElement('script');
script.textContent = '(' + callback.toString() + ')();';
document.body.appendChild(script);
}, false);
document.body.appendChild(script);
}(main));
}
}());