Tuesday, February 21, 2012

Office Jokes -- the user scripts (scare your friends, create laughs,...etc)

A few months ago I started creating browser jokes.  This one is called user-scripts for Chrome and Greasemonkey for Firefox.  User-scripts is built inside the Chrome browser, so, I prefer using Chrome.

All you need to do is create a ".user.js" extension, and open it in Chrome browser for Chrome users. For Firefox I forgot how to install it ;).

Anyways, the example below will modify something at Wikipedia to my name everytime you will visit the page labeled by "@match". Check it out....

Also, you can have a scary image popping up everytime a certain page is visited. Yep, I have lots of fun with it.  All you need to do is get the base64 of an image and start from there.

You can also do cool things in Facebook, like removing the blue header and change its title from Facebook to Research Book if you want it to.

----- begin code of "wikijoke-cebu.user.js" -------

// ==UserScript==
// @name           wikijoke-cebu
// @namespace      wikijoke-cebu
// @description    wikijoke-cebu
// @match        http://en.wikipedia.org/wiki/Cebu
// ==/UserScript==

var h = document.getElementById("firstHeading");
h.innerHTML = "Adrian Migraso";

----- end code ----------------