Plint change header between testing and production

Plint header color based on development

目前為 2023-11-02 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Plint change header between testing and production
// @description  Plint header color based on development
// @namespace    http://tampermonkey.net/
// @license      MIT
// @version      0.1
// @author       Paul Egell-Johnsen
// @match        https://*.plint.dev/*
// @match        https://*.plint.app/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=plint.dev
// @grant        GM_addStyle
// ==/UserScript==

(function() {
    'use strict';
    const mainNavbar = document.getElementById('main-navbar');
    const div = document.createElement('div');
    div.style.setProperty('font-size','2em');

    if (location.href.match(/nrk-1-core.test.plint.dev/gi)) {
        div.innerText = 'Testing';

        GM_addStyle ( `
      #main-navbar {
          background-color: #66ff66;
      }
    ` );

    }

    if (location.href.match(/nrk.plint.app/gi)) {
        div.innerText = 'Production';
        GM_addStyle ( `
      #main-navbar {
          background-color: #ff6666;
      }
    ` );
    }
    mainNavbar.appendChild( div );

})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址