Created
January 21, 2012 20:58
-
-
Save satyr/1653981 to your computer and use it in GitHub Desktop.
goo lyrics fix
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
// ==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); | |
} | |
}); |
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
`// ==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