@abcnews/dev-proxy

Provides the capability to override an news-projects script with a different script with settings defined in localStorage.

Usage no npm install needed!

<script type="module">
  import abcnewsDevProxy from 'https://cdn.skypack.dev/@abcnews/dev-proxy';
</script>

README

Dev script proxy

Provides the capability to override an news-projects script with a different script with settings defined in localStorage.

The script being overridden needs to import and use this library:

import { proxy } from '@abcnews/dev-proxy';

function init() {
  // The code that kicks off your script goes here.
}

proxy('project-name').then(init);

To put the override into effect localStorage needs to contain an entry with key proxy_<project-name> that contains the URL of the script to override with.

Bookmarklet

You can use this bookmarklet to help setup the config.