Polyfill for GM.addStyle, for some reason their script doesn't work?
이 스크립트는 직접 설치하는 용도가 아닙니다. 다른 스크립트에서 메타 지시문 // @require https://update.greasyfork.org/scripts/35383/231590/GMaddStyle%20Polyfill.js을(를) 사용하여 포함하는 라이브러리입니다.
// ==UserScript==
// @name GM.addStyle Polyfill
// @namespace https://orbitalzero.ovh/scripts
// @version 0.01
// @description Polyfill for GM.addStyle, for some reason their script doesn't work?
// @author NeutronNoir
//
// ==/UserScript==
GM.addStyle = function (aCss) {
'use strict';
let head = document.getElementsByTagName('head')[0];
if (head) {
let style = document.createElement('style');
style.setAttribute('type', 'text/css');
style.textContent = aCss;
head.appendChild(style);
return style;
}
return null;
};