您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
The correct answer pops up in the browser console (ctrl+shift+I on chrome)
当前为
- // ==UserScript==
- // @name Quizlet gravity game "helper"
- // @namespace Danielv123
- // @version 1.0
- // @description The correct answer pops up in the browser console (ctrl+shift+I on chrome)
- // @author You
- // @match https://quizlet.com/*/gravity
- // @grant none
- // ==/UserScript==
- selector = "#GravityGameTarget > div > div.GravityGameplayView > div.GravityGameplayView-inner > div:nth-child(5) > div > div > div > div > span > span";
- setInterval(function() {
- console.log(words[document.querySelector(selector).innerHTML]);
- document.querySelector("#GravityGameTarget > div > div.GravitySidebar > div > div > button:nth-child(2)").innerHTML = words[document.querySelector(selector).innerHTML]
- }, 100)
- words = {}
- function loadXMLDoc(link) {
- var xmlhttp = new XMLHttpRequest();
- xmlhttp.onreadystatechange = function() {
- if (xmlhttp.readyState == XMLHttpRequest.DONE ) {
- if (xmlhttp.status == 200) {
- var element = document.createElement('div');
- element.insertAdjacentHTML('beforeend', xmlhttp.responseText);
- adsaf = element.querySelectorAll(".TermText");
- for(i=0;i<adsaf.length;i+=2){
- words[adsaf[i].innerHTML] = adsaf[i+1].innerHTML;
- }
- }
- }
- };
- xmlhttp.open("GET", link, true);
- xmlhttp.send();
- }
- loadXMLDoc("https://quizlet.com/"+document.location.pathname.substring(1, 9)+"/original?_pjax");