Skip to content

Instantly share code, notes, and snippets.

@Eotones
Last active February 4, 2025 02:34
Show Gist options
  • Save Eotones/5bf697f10cb49635453f9b2f4bed6ec3 to your computer and use it in GitHub Desktop.
Save Eotones/5bf697f10cb49635453f9b2f4bed6ec3 to your computer and use it in GitHub Desktop.
解決 PTT term 無法開圖問題
// ==UserScript==
// @name         PTT term
// @namespace    http://tampermonkey.net/
// @version      2024-10-03
// @description  try to take over the world!
// @author       You
// @match        https://term.ptt.cc/
// @icon         https://www.google.com/s2/favicons?sz=64&domain=ptt.cc
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    let elem = document.createElement("meta");
    //elem.name == 'referrer';
    elem.setAttribute("name", "referrer");
    elem.content = 'no-referrer';

    let elem_head = document.head;
    elem_head.appendChild(elem);

    //將網頁安裝成應用程式後可以改瀏覽器外框顏色,好看用
    let elem2 = document.createElement("meta");
    //elem2.name == 'referrer';
    elem2.setAttribute("name", "theme-color");
    elem2.content = '#333333';

    elem_head.appendChild(elem2);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment