chaoxing-copy-helper

📝解除超星学习通复制粘贴限制,解除学习通复制乱码问题;✨“一键复制题目”、“一键粘贴到答案”、“复制好友答案”等功能。🧹大小仅1.62KB,极小尺寸,无需任何权限,无需任何配置,安装即用。💛安全开源可读,无论是编译前后的代码均保持开源和易读性,防止窃取其他信息

目前為 2024-06-03 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         chaoxing-copy-helper
// @namespace    npm/vite-plugin-monkey
// @version      1.0
// @author       甜檸Cirtron (lcandy2)
// @description  📝解除超星学习通复制粘贴限制,解除学习通复制乱码问题;✨“一键复制题目”、“一键粘贴到答案”、“复制好友答案”等功能。🧹大小仅1.62KB,极小尺寸,无需任何权限,无需任何配置,安装即用。💛安全开源可读,无论是编译前后的代码均保持开源和易读性,防止窃取其他信息
// @license      AGPL-3.0-or-later
// @icon         https://vitejs.dev/logo.svg
// @match        *://*.chaoxing.com/*
// ==/UserScript==

(function () {
  'use strict';

  const removeCopyLimits = () => {
    document.body.removeAttribute("onselectstart");
    document.documentElement.style.userSelect = "unset";
    UE.EventBase.prototype.fireEvent = () => {
      console.info("[Chaoxing Copy Helper] Removed paste limits.");
      return null;
    };
    console.info("[Chaoxing Copy Helper] Removed copy limits.");
  };
  const href = window.location.href;
  const addBranding = () => {
    addExamBranding();
  };
  const addExamBranding = () => {
    if (href.includes("exam-ans/exam/test")) {
      const markInfo = document.querySelector(".mark_info");
      if (markInfo) {
        const branding = document.createElement("p");
        branding.innerHTML = `已解除复制/粘贴限制<br><span style="font-size: 12px;">- 由 学习通复制粘贴助手 Chaoxing Copy Helper 提供 -</span>`;
        markInfo.appendChild(branding);
      }
    }
  };
  setTimeout(() => {
    removeCopyLimits();
    addBranding();
  }, 1e3);

})();