Skip to content

Instantly share code, notes, and snippets.

@satyr
Created January 21, 2012 20:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save satyr/1653981 to your computer and use it in GitHub Desktop.
Save satyr/1653981 to your computer and use it in GitHub Desktop.
goo lyrics fix
// ==UserScript==
// @id goo_lyrics_fix
// @name goo lyrics fix
// @version 0
// @namespace http://satyr.github.com
// @author satyr
// @description Unrestricts the UI.
// @include http://music.goo.ne.jp/lyric/*/index.html
// @run-at document-end
// ==/UserScript==
var e, _i, _ref, _len;
for (_i = 0, _len = (_ref = ['selectstart', 'contextmenu']).length; _i < _len; ++_i) {
e = _ref[_i];
document.body.removeAttribute("on" + e);
}
GM_xmlhttpRequest({
method: 'GET',
url: (function(){
return '' + /\/sp\/lyric\/print_json[^']+/.exec(this.nextElementSibling.textContent);
}.call(document.querySelector('script[src="/music/js/uuCanvas.js"]'))),
onload: function(it){
var canvas, _ref;
canvas = document.querySelector('#canvas');
return canvas.parentNode.replaceChild((_ref = document.createElement('pre'), _ref.textContent = JSON.parse(/\[.+]/.exec(it.responseText)).join(''), _ref), canvas);
}
});
`// ==UserScript==
// @id goo_lyrics_fix
// @name goo lyrics fix
// @version 0
// @namespace http://satyr.github.com
// @author satyr
// @description Unrestricts the UI.
// @include http://music.goo.ne.jp/lyric/*/index.html
// @run-at document-end
// ==/UserScript==`
for e of <[ selectstart contextmenu ]>
document.body.removeAttribute "on#e"
GM_xmlhttpRequest do
method: \GET
url: with document.querySelector 'script[src="/music/js/uuCanvas.js"]'
''+ // /sp/lyric/print_json[^']+ //exec @nextElementSibling.textContent
onload: ->
canvas = document.querySelector \#canvas
canvas.parentNode.replaceChild do
document.createElement(\pre) <<<
textContent: JSON.parse /\[.+]/exec it.responseText .join ''
canvas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment