This file contains hidden or 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
/** | |
* Function that gets data from or sets data to the property / cache. | |
* | |
* @param {String} storage property / cache (required). | |
* @param {String} key to be used to get data stored in the property / cache (required). | |
* @param {String} scope of the storage. valid scopes - user, script, document (required). | |
* @param {String} dataType of the property / cache, possible values: json, bool, string (required when action is set). | |
* @param {String} action to be performed, get / set the property / cache (required if the action is set). | |
* @param {String} value if action === 'set', value to be set. (required if the action is set) |
This file contains hidden or 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
/** | |
* Used https://www.odditysoftware.com/page-webtools16.htm to remove comments and minify the code to use it as a bookmarklet | |
*/ | |
( | |
function () { | |
/* Exiting if the webpage is not Twitter or a valid tweet */ | |
if (window.location.origin !== 'https://twitter.com' || window.location.pathname.split('/').length !== 4) return alert('This is not a valid Twitter poll!'); | |
alert('Please wait this can take up to 30 seconds. Select OK or close to get started. If this is a valid poll, you will get the result when it is ready...:)'); |