您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
使ieltsonlinetests的考试页面适合打印
// ==UserScript== // @name ieltsonlinetests 打印助手 // @namespace http://tampermonkey.net/ // @version 0.1 // @description 使ieltsonlinetests的考试页面适合打印 // @author You // @match https://ieltsonlinetests.com/* // @grant none // ==/UserScript== (function() { var $ = window.$; let printButton = ` <button id="print-btn" style="position: fixed;bottom: 1rem; left: 1rem; z-index: 9999;"> Print </button>`; $('body').append(printButton); $('#print-btn').click(() => { let prevHtml = $('body')[0].outerHTML, testPaper = $(`.testing.listening-page>.lp-left>.split-left.cyan`)[0]; ['.player.player-fixed', '.question-board', '.end-the-test', '.player-loading', '.box-ad728'].forEach(el => { $(testPaper).find(el).remove(); }); $('.listening-test-page').css({'padding-top': '0px'}); $('body').empty().append(testPaper); window.print(); $('body').empty().append(prevHtml); }); })();