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
window.onload = function() { | |
$("#login").click(function(event) { | |
chrome.identity.launchWebAuthFlow( | |
{'url': 'http://localhost:3000/oauth/authorize?client_id=7b529aed5e89c14bd45c4cb949f220e5bc4cc440003dd7604d3fc6ed43f29844&redirect_uri=https%3A%2F%2Fhnjjholodahaklljjenjpfbkkghppdpk.chromiumapp.org%2Fvyrtex-chrome-extension&response_type=code', 'interactive': true}, | |
function(redirect_url) { | |
console.log(redirect_url); | |
var code = redirect_url.substring(redirect_url.indexOf("=") + 1, redirect_url.length ); | |
exchangeCodeForToken(code); | |
}); |
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
(function(d) { | |
var dl = d.createElement('a'); | |
dl.innerText = 'Download MP3'; | |
dl.href = "http://media.soundcloud.com/stream/"+d.querySelector('#main-content-inner img[class=waveform]').src.match(/\.com\/(.+)\_/)[1]; | |
dl.download = d.querySelector('em').innerText+".mp3"; | |
d.querySelector('.primary').appendChild(dl); | |
dl.style.marginLeft = '10px'; | |
dl.style.color = 'red'; | |
dl.style.fontWeight = 700; | |
})(document); |
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
// For details see: | |
// https://developer.mozilla.org/en/XPCOM_Interface_Reference/nsIContentPolicy | |
// https://developer.mozilla.org/en/XPCOM_Interface_Reference/nsICategoryManager | |
const { Ci } = require('chrome') | |
const xpcom = require('api-utils/xpcom') | |
const policy = { | |
contractID: '@lduros.net/PreventImage-policy', | |
name: 'Implements content policy to prevent images from being loaded', |
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
/*jshint asi:true globalstrict:true*/ | |
'use strict'; | |
let { Cc, Ci } = require('chrome') | |
let ioService = Cc['@mozilla.org/network/io-service;1']. | |
getService(Ci.nsIIOService) | |
let resourceHandler = ioService.getProtocolHandler('resource'). | |
QueryInterface(Ci.nsIResProtocolHandler) |
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
/*jshint asi:true globalstrict:true*/ | |
'use strict'; | |
// Workaround for Bug 785891 | |
// and sugar around: https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIComponentManager#addBootstrappedManifestLocation%28 | |
let { Cc, Ci, Cm } = require('chrome') | |
let ioService = Cc['@mozilla.org/network/io-service;1']. | |
getService(Ci.nsIIOService) |
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
/*jshint asi:true globalstrict:true*/ | |
'use strict'; | |
let { Cc, Ci } = require('chrome') | |
let ioService = Cc['@mozilla.org/network/io-service;1']. | |
getService(Ci.nsIIOService) | |
let resourceHandler = ioService.getProtocolHandler('resource'). | |
QueryInterface(Ci.nsIResProtocolHandler) |
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 Emulate `unsafeWindow` in browsers that don’t support it. | |
// ==/UserScript== | |
// http://mths.be/unsafewindow | |
window.unsafeWindow || ( | |
unsafeWindow = (function() { | |
var el = document.createElement('p'); | |
el.setAttribute('onclick', 'return window;'); | |
return el.onclick(); |
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
(function(d) { | |
var dl = d.createElement('a'); | |
dl.innerText = 'Download MP3'; | |
dl.href = "http://media.soundcloud.com/stream/"+d.querySelector('#main-content-inner img[class=waveform]').src.match(/\.com\/(.+)\_/)[1]; | |
dl.download = d.querySelector('em').innerText+".mp3"; | |
d.querySelector('.primary').appendChild(dl); | |
dl.style.marginLeft = '10px'; | |
dl.style.color = 'red'; | |
dl.style.fontWeight = 700; | |
})(document); |
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 UserScriptLoader.uc.js | |
// @author Griever | |
// @include main | |
// @description Greasemonkey っぽいもの | |
// @version 0.1.6.1 | |
// @note 0.1.6.1 uAutoPagerize との連携ができなかったのを修正 | |
// @note 0.1.6.1 .user.js 間での連携は多分できません。。 | |
// @note 0.1.6 色々修正。unsafeWindow 使ってて動かなかった物が動くかも | |
// @note 0.1.6 Firefox 3.6 は切り捨てた |
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 View Add-on Compatibility Reports | |
// @namespace http://userscripts.org/scripts/show/61398 | |
// @version 0.1 | |
// @description Adds a link to add-on compatibility reports to addons.mozilla.org. | |
// @include https://addons.mozilla.org/* | |
// @include https://preview.addons.mozilla.org/* | |
// @author http://userscripts.org/users/fcp | |
// @license This program is in the public domain. | |
// ==/UserScript== |
NewerOlder