Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

injected stylesheet remove

/* Answer to: "injected stylesheet remove" */

function loadCSS(file) {
  var link = document.createElement("link");
  link.href = chrome.extension.getURL(file + '.css');
  link.id = file;
  link.type = "text/css";
  link.rel = "stylesheet";
  document.getElementsByTagName("head")[0].appendChild(link);
}

function unloadCSS(file) {
  var cssNode = document.getElementById(file);
  cssNode && cssNode.parentNode.removeChild(cssNode);
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: detect touch react 
Javascript :: adonis attach 
Javascript :: javascript add required to input 
Javascript :: moment get month name 
Javascript :: vue js store and retrieve api data to localstorage 
Javascript :: 413 payload too large nodejs 
Javascript :: axios upload progress react 
Javascript :: change name of html element javascript 
Javascript :: nestjs Built-in HTTP exceptions 
Javascript :: fetch json file 
Javascript :: check if a class exists javascript 
Javascript :: redirect using javascript 
Javascript :: javascript redirect example 
Javascript :: get a element using name in jquery 
Javascript :: change word in string javascript 
Javascript :: puppeteer stealth 
Javascript :: install json-server 
Javascript :: how to read a json file in node js 
Javascript :: get browser timezone 
Javascript :: arry suffle javascript 
Javascript :: jquery page finished loading 
Javascript :: javascript get file extension from string 
Javascript :: how to right rotate an array in JS 
Javascript :: express get form x-www-form-urlencoded 
Javascript :: javascript explode 
Javascript :: for array javascript 
Javascript :: loop an array in javascript 
Javascript :: javascript last index 
Javascript :: vue test form input 
Javascript :: sum of number using reduce 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =