Skip to content

Instantly share code, notes, and snippets.

@mavc
Created March 9, 2018 05:06
Show Gist options
  • Save mavc/e467ee92546a0bfe11d91bfee2566a6b to your computer and use it in GitHub Desktop.
Save mavc/e467ee92546a0bfe11d91bfee2566a6b to your computer and use it in GitHub Desktop.
// ==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