-
-
Save jasherai/73372 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//STUMBLEUPON | |
var window = CmdUtils.getWindow(); | |
function createCustomCommand(name, desc, func){ | |
return CmdUtils.CreateCommand({ | |
name: name, | |
icon: "http://www.stumbleupon.com/favicon.ico", | |
homepage: "http://foyrek.com/", | |
author: { name: "Abimanyu", email: "abimanyuraja@gmail.com"}, | |
license: "GPL", | |
description: desc, | |
preview: function( pblock, input ) { | |
pblock.innerHTML = desc; | |
}, | |
execute: function() { | |
func.apply(this); | |
} | |
}); | |
} | |
createCustomCommand("stumble", "Stumbles using StumbleUpon", function(){window.stumble(0);}); | |
createCustomCommand("thumbs-up", "Add to StumbleUpon favorites. Show more like this.", function(){ | |
window.su_rate(1, 0, 0, 0); | |
}); | |
createCustomCommand("thumbs-down", "Dislikes this page on StumbleUpon. No more like this.", function(){ | |
window.su_rate(0, 0, 0, 0); | |
displayMessage("You disliked it"); | |
}); | |
createCustomCommand("view-reviews", "View reviews of this page on StumbleUpon", function(){window.su_website_info(0,'', 0);}); | |
createCustomCommand("toggle-toolbar", "Toggle the StumbleUpon toolbar", function(){window.su_toggle_toolbar();}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment