no-more-script
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

no-more-script

One script to stop all other scripts!

Once this script has been loaded, any script loaded later will not run.

<script>console.log('inline 1');</script> 
<script src="./a.js"></script>
<script defer src="./b.js"></script>
 
<script src="./no-more-script.js"></script>
 
<script src="./c.js"></script>
<script defer src="./d.js"></script>
<script>
  console.log('inline 2');
  setTimeout(() => {
    const script = document.createElement('script');
    script.src = './e.js';
    document.head.appendChild(script);
  }, 500);
</script> 

Output:

// Output with no-more-script
inline 1
A
B
  
// Output without no-more-script
inline 1
A
C
inline 2
B
D
E 

Readme

Keywords

Package Sidebar

Install

npm i no-more-script

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

7.78 kB

Total Files

14

Last publish

Collaborators

  • shihn