Created
March 9, 2018 05:06
-
-
Save mavc/e467ee92546a0bfe11d91bfee2566a6b to your computer and use it in GitHub Desktop.
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 Lyric Select | |
// @namespace github.com/mavc | |
// @include http://www.kasi-time.com/* | |
// @include http://j-lyric.net/* | |
// @include https://www.uta-net.com/* | |
// @version 1.0 | |
// @grant unsafeWindow | |
// ==/UserScript== | |
(function () { | |
const MAPPING = [ | |
{ | |
key: 'kasi-time', | |
handler() { | |
let $ = unsafeWindow.jQuery; | |
$("body").off(); | |
$("head style").remove(); | |
} | |
}, | |
{ | |
key: 'j-lyric', | |
handler() { | |
let b = document.querySelector('body'); | |
b.removeAttribute('oncontextmenu'); | |
b.removeAttribute('onselectstart'); | |
} | |
}, | |
{ | |
key: 'uta-net', | |
handler() { | |
let $ = unsafeWindow.jQuery; | |
$("body").unbind(); | |
$("#flash_area > img").remove(); | |
} | |
} | |
]; | |
const url = window.location.host; | |
for (let { key, handler } of MAPPING) { | |
if (url.includes(key)) { | |
window.addEventListener("load", handler); | |
break; | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment