🏠 Home 

继续操作前请注册或者登录。

OneClick Tools - McGraw-Hill

Copy/Google with a single click on all McGraw-Hill quiz questions of your course.


Installer dette script?
Skaberens foreslåede script

Du vil måske også kunne lide OneClick Tools - Canvas Instructure


Installer dette script
  1. // ==UserScript==
  2. // @name OneClick Tools - McGraw-Hill
  3. // @namespace https://greasyfork.org/en/users/670188-hacker09?sort=daily_installs
  4. // @version 4
  5. // @description Copy/Google with a single click on all McGraw-Hill quiz questions of your course.
  6. // @author hacker09
  7. // @match https://ezto.mheducation.com/ext/map/index.html*
  8. // @icon https://t3.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://ezto.mheducation.com&size=64
  9. // @run-at document-end
  10. // @grant none
  11. // ==/UserScript==
  12. setInterval(() => {
  13. (function() {
  14. 'use strict';
  15. document.querySelector("#question-info-holder")?.remove();
  16. document.querySelector(".Win32").style.cursor = "pointer"; //Change cursor style to pointer
  17. document.querySelector(".Win32").addEventListener('mouseup', function(event) { //When the mouse is clicked
  18. event.preventDefault(); //Prevent the default context menu from being opened
  19. if (event.button === 0) { //If the user single click anywhere on the question/answer
  20. navigator.clipboard.writeText(document.querySelector(".Win32").innerText.replaceAll(/\n|\s+|%media:case.jpg%|Required information|Skip to question|View the animation below, then complete the quiz to test your knowledge of the concept./gm, ' ')); //Copy the text and question
  21. } else if (event.button === 2) { //If the user right click anywhere on the question/answer
  22. navigator.clipboard.writeText(document.querySelector(".Win32").querySelector(".question, .worksheet__main > p")?.innerText); //Copy the question
  23. open('https://www.google.com/search?q=' + encodeURIComponent(document.querySelector(".Win32").innerText.replaceAll(/\n|\s+|%media:case.jpg%|Required information|Skip to question|View the animation below, then complete the quiz to test your knowledge of the concept./gm, ' '))); //Google the question and answer
  24. } //Finishes the else condition
  25. }); //Finishes the mouseup event listener
  26. })()
  27. }, 1000);