// ==UserScript== // @name 巴哈動漫電玩通題庫與解答系統 // @namespace https://home.gamer.com.tw/moontai0724 // @version 4.0.1 // @description 巴哈動漫電玩通題庫與解答系統,蒐集題庫中~ // @author moontai0724 // @match https://forum.gamer.com.tw/B.php* // @supportURL https://home.gamer.com.tw/creationDetail.php?sn=3924920 // @grant GM_xmlhttpRequest // @grant GM_getResourceText // @connect script.google.com // @connect script.googleusercontent.com // @require https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js // @resource quizrp https://raw.githubusercontent.com/moontai0724/UserScripts/master/GamerQuizDB/quizrp.html // @license MIT // @downloadURL none // ==/UserScript== (function (jQuery) { 'use strict'; // add button to monitor html loading jQuery("body").append(''); jQuery('#quizrp_html_loaded').on('click', init); // load html jQuery(GM_getResourceText("quizrp")).insertAfter(".BH-qabox1"); // variables const qabox = jQuery(".BH-rbox.BH-qabox1"); var quizrp_quiz = { sn: qabox.data("quiz-sn"), question: encodeURIComponent(qabox.html().replace(/\n/g, '').split('