您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
A script for opening iframes in fullscreen in canvas
// ==UserScript== // @name Open In Fullscreen // @namespace http://tampermonkey.net/ // @version 0.4 // @description A script for opening iframes in fullscreen in canvas // @author FBastiaan04 // @match https://canvas.vu.nl/courses/*/assignments/*/submissions/* // @match https://canvas.vu.nl/courses/*/assignments/* // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== // @grant none // @license mit // ==/UserScript== (function() { 'use strict'; console.log("running now"); const iframe = document.getElementById("not_right_side").querySelector("iframe") const oldStyle = iframe.getAttribute("style"); const openButton = document.createElement("button"); openButton.innerText = "Open"; openButton.addEventListener("click", () => { iframe.style.position = "fixed"; iframe.style.left = "84px"; iframe.style.top = "0px"; iframe.style.zIndex = "100"; iframe.style.width = "calc(100vw - 84px"; iframe.style.height = "100vh"; document.body.style.overflow = "hidden"; }); iframe.parentElement.insertBefore(openButton, iframe); const li = document.createElement("li"); li.innerHTML = "<button>close</button>"; li.firstElementChild.addEventListener("click", () => { iframe.setAttribute("style", oldStyle); }); document.getElementById("menu").appendChild(li); })();