Created
July 16, 2009 02:57
-
-
Save erikvold/148131 to your computer and use it in GitHub Desktop.
IMDB Vote Menu Command for Greasemonkey
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
// ==UserScript== | |
// @name IMDB Vote Command | |
// @author Erik Vold | |
// @namespace imdbVoteCommand | |
// @include http*://*.imdb.com/title/*/ | |
// @version 0.1 | |
// @datecreated 2009-07-14 | |
// @lastupdated 2009-07-15 | |
// @description Allows you to vote on a movie via Greasemonkey menu command. | |
// ==/UserScript== | |
var imdbVoteCommand = {}; | |
imdbVoteCommand.executeFunc = function( str ){ | |
if( !str && unsafeWindow.ubiquityGMInput ){ | |
var str = unsafeWindow.ubiquityGMInput; | |
} | |
else if ( !str ) { | |
var str = prompt( "Vote:" ); | |
} | |
unsafeWindow.vote( str ); | |
return; | |
}; | |
GM_registerMenuCommand( "vote", imdbVoteCommand.executeFunc, "", "", "v" ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment