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
var XMLHttpRequest = Cc['@mozilla.org/xmlextras/xmlhttprequest;1']; | |
var timeoutTimer; | |
/** | |
* The following keys can be sent: | |
* onSuccess (required) a function called when the response is 2xx | |
* onFailure a function called when the response is not 2xx (IF onFailure and onTimeout are defined, when times out then onTimeout is executed only and not onFailure. IF onFailure is defined and onTimeout is NOT defined then when times out it will execute onFailure) (not called if aborted) | |
* username The username for basic auth | |
* password The password for basic auth | |
* overrideMimeType The mime type to use for non-XML response mime types | |
* timeout A timeout value in milliseconds for the response |
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
const {classes: Cc, interfaces: Ci, utils: Cu} = Components; | |
var myTimer = Cc['@mozilla.org/timer;1'].createInstance(Ci.nsITimer); | |
var myTimerCookie; | |
var myTimerInterval = 5000; | |
// we need an nsITimerCallback compatible interface for the callbacks. | |
var myTimerEvent = { | |
notify: function(timer) { | |
Cu.reportError('Timer Fired!'); | |
//do stuff here, this stuff will finish and then timer will start countdown of myTimerInterval. |
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
var labelHTTP = 'loadPreLike - loadingPreLike of el0 in like arr'; | |
HTTP('GET',referer,{ | |
returnHeaders: true, | |
/*timeout: 30000, | |
onTimeout: function() { | |
Cu.reportError('TIMEOUT: ' + labelHTTP); | |
},*/ | |
onSuccess: function(status, responseXML, responseText, headers, statusText) { | |
Cu.reportError('SUCCESS: ' + labelHTTP + '\n\nstatusText:' + statusText + '\nresponseText:' + responseText + '\nheaders:' + uneval(headers)); | |
var respDataStr = [];respDataStr.push('status:"' + status + '"');respDataStr.push('statusText:"' + statusText + '"');respDataStr.push('responseText:"' + responseText + '"');respDataStr.push('headers:"' + uneval(headers) + '"');respDataStr = respDataStr.join('<br><br>'); |
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
//https://api.twitter.com/oauth/request_token | |
//requestURL: "https://api.twitter.com/oauth/request_token" | |
var param = { | |
oauth_callback: 'http://www.floppers.comyr', | |
oauth_signature_method: 'PLAINTEXT', | |
oauth_timestamp: '', ////running setTimestampNonceSignature() will update this | |
oauth_version: '1.0', | |
oauth_consumer_key: ' jrcJKxvJ92NeeV48RL1lotN9PigbxCCbqUkKj237yio', //api key u get from ur app page on twiitter | |
oauth_signature: '', //running setTimestampNonceSignature() will update this //to make the function i followed steps here to create my gen function: https://dev.twitter.com/docs/auth/creating-signature | |
oauth_nonce: '' //running setTimestampNonceSignature() will update this |
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
Cu.import('chrome://cdumpjsm/content/cDump.jsm'); | |
initSHA1(this); //onload must run this once | |
var HTTPMethod = 'POST'; | |
var requestURL = 'https://api.twitter.com/oauth/request_token'; | |
var APIKey = 'AjONvgAdbD8YWCtRn5U9yA'; //also known as oauth_consumer_key //from your app page on twitter dev site | |
var ConsumerSecret = 'jrcJKxvJ92NeeV48RL1lotN9PigbxCCbqUkKj237yio'; //from your app page on twitter dev site | |
var OAuthTokenSecret = ''; | |
var param = { |
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
Cu.import('chrome://cdumpjsm/content/cDump.jsm'); | |
initSHA1(this); //onload must run this once | |
var HTTPMethod = 'POST'; | |
var requestURL = 'https://api.twitter.com/oauth/request_token'; | |
var APIKey = 'AjONvgAdbD8YWCtRn5U9yA'; //also known as oauth_consumer_key //from your app page on twitter dev site | |
var ConsumerSecret = 'jrcJKxvJ92NeeV48RL1lotN9PigbxCCbqUkKj237yio'; //from your app page on twitter dev site | |
var OAuthTokenSecret = ''; | |
var param = { |
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
var win = Services.wm.getMostRecentWindow('navigator:browser'); | |
var panel = win.document.createElement('panel'); | |
var props = { | |
type: 'arrow', | |
style: 'width:300px;height:100px;' | |
} | |
for (var p in props) { | |
panel.setAttribute(p, props[p]); | |
} |
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
const {classes: Cc, interfaces: Ci, utils: Cu} = Components; | |
const self = { | |
id: 'Floppers', | |
suffix: '@jetpack', | |
path: 'chrome://floppers/content/', | |
aData: 0, | |
}; | |
const myServices = {}; | |
Cu.import('resource://gre/modules/Services.jsm'); |
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
<div style="left: 10px; top: 10px;" class="roar-body"> | |
<div id="shipyard-hrtypyw7" style="opacity: 1;" class="roar error"><div style="" class="roar-bg"></div><div class="roar-icon"></div><h3>Install Add-on Builder Helper</h3><p>To test this add-on, please install the <a id="install_addon_helper" href="https://addons.mozilla.org/firefox/downloads/latest/182410?src=external-builder">Add-on Builder Helper add-on</a></p></div> | |
<div id="shipyard-hrtypyw7" style="opacity: 1;" class="roar warning"><div style="" class="roar-bg"></div><div class="roar-icon"></div><h3>Install Add-on Builder Helper</h3><p>To test this add-on, please install the <a id="install_addon_helper" href="https://addons.mozilla.org/firefox/downloads/latest/182410?src=external-builder">Add-on Builder Helper add-on</a></p></div> | |
<div id="shipyard-hrtypyw7" style="opacity: 1;" class="roar message"><div style="" class="roar-bg"></div><div class="roar-icon"></div><h3>Install Add-on Builder Helper</h3><p>To test this add-on, please install the <a id |
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
var loadFlags = chan.loadFlags; | |
if (chan.URI.schemeIs("https")) | |
loadFlags &= ~chan.INHIBIT_PERSISTENT_CACHING; //the &= ~ will add it |