Created
February 24, 2022 00:44
-
-
Save ilovejs/38dabd2323f01f087faff72267c10b0b 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 sydneytoday copy helper | |
// @namespace http://www.github.com/ | |
// @version 0.1.0 | |
// @description copyable | |
// @author xx | |
// @license MIT | |
// @match https://www.sydneytoday.com/* | |
// @icon https://www.google.com/s2/favicons?domain=www.sydneytoday.com | |
// @run-at document-start | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
window.addEventListener('load', (event) => { | |
console.log('page is fully loaded'); | |
const pathname = location.pathname; | |
let contentDiv = document.getElementsByClassName("news-content")[0]; | |
contentDiv.removeAttribute("oncopy") | |
contentDiv.removeAttribute("onselectstart") | |
console.log(contentDiv); | |
/* | |
contentDiv.removeEventListener('selectstart', e => { | |
return false | |
});*/ | |
//let new_element = contentDiv.cloneNode(true); | |
//contentDiv.getEventListeners() | |
//contentDiv.parentNode.replaceChild(new_element, contentDiv); | |
}); | |
} | |
)(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment