Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ruyaoyao/b03a78ece88c16e41aa5 to your computer and use it in GitHub Desktop.
Save ruyaoyao/b03a78ece88c16e41aa5 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @match https://yourwebsite.com/xyz
// @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
// @require http://cdnjs.cloudflare.com/ajax/libs/sugar/1.3/sugar.min.js
// ==/UserScript==
alert('Hello, I got jQuery included and sugarJs too');
var runEverySecond = function(){
$('p').find('img').attr('width', '0px');
$('a').css('padding', '0px');
console.debug('Hello Word has ' + $('p').length + ' paragraphs');
};
$(document).ready(function() {
setInterval(runEverySecond,1000);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment