Skip to content

Instantly share code, notes, and snippets.

@erikvold
Created July 16, 2009 02:57
Show Gist options
  • Save erikvold/148131 to your computer and use it in GitHub Desktop.
Save erikvold/148131 to your computer and use it in GitHub Desktop.
IMDB Vote Menu Command for Greasemonkey
// ==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