Proprietary Elements

Adds compatibility for the blink and marquee elements in the form of CSS 3 animations and JQuery.

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

You will need to install an extension such as Tampermonkey to install this script.

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name        Proprietary Elements
// @namespace   https://github.com/c0des1ayr
// @match       *://*/*
// @grant       GM.addStyle
// @grant       GM.xmlHttpRequest
// @run-at      document-idle
// @version     1.0
// @author      c0des1ayer
// @license     MIT
// @connect     code.jquery.com
// @connect     gist.githubusercontent.com
// @antifeature This script loads the latest version of an external script directly, which may potentially become malicious in the future.
// @description Adds compatibility for the blink and marquee elements in the form of CSS 3 animations and JQuery.
// ==/UserScript==
/* jshint esversion: 8 */
(async function() {
    'use strict';

    const delay = ms => new Promise(res => setTimeout(res, ms));

    function fetchAndExecuteScript(url, callback) {
      GM.xmlHttpRequest({
          method: 'GET',
          url: url,
          onload: (response) => {
              if (response.status >= 200 && response.status < 300) {
                  const scriptText = response.responseText;
                  const script = document.createElement('script');
                  script.textContent = scriptText;
                  document.head.appendChild(script);
                  console.log(`Successfully executed script from: ${url}`);
                  callback && callback();
              } else {
                  console.error(`Failed to load script: ${url}. Status: ${response.status}`);
              }
          },
          onerror: (err) => {
            console.error(`Error fetching script: ${url}`, err);
          }
      });
    }

    if (!window.JQuery) fetchAndExecuteScript('https://code.jquery.com/jquery-3.7.1.min.js');
    await delay(250);
    fetchAndExecuteScript('https://gist.githubusercontent.com/remy/2484402/raw/50eb9541d959c842b7ad4f3d7f7346a2f49ff8cb/gistfile1.js')

    GM.addStyle(`
      @keyframes blink {0% { opacity:1 } 75% { opacity:1 } 76% { opacity:0 } 100% { opacity:0 }}
      blink {animation:blink 0.75s ease-in infinite alternate!important;}
    `)
})();