NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name ZScript for TMO ContextMenu // @namespace http://tampermonkey.net/ // @version 0.0.4 // @description Enable Context Menu for the web site // @author Zearch // @match https://tmofans.com/viewer/*/* // @grant none // @license MIT // @updateURL https://openuserjs.org/meta/sanson222/ZScript_for_TMO_ContextMenu.meta.js // @copyright 2019, sanson222 (https://openuserjs.org/users/sanson222) // ==/UserScript== var canvasCollection = document.getElementById('viewer-container').childNodes; var canvasCollectionArr = [].slice.call(canvasCollection); var filteredCollection = canvasCollectionArr.filter(function(i) { if (i.nodeName === '#text') { return false; } return true; }); var mappedCollection = filteredCollection.map(function(el){ return el.childNodes[1];}); mappedCollection.forEach(function(el) { el.setAttribute('oncontextmenu', ''); });