🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

@abcnews/hash-scripts-loader

Package Overview
Dependencies
Maintainers
5
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@abcnews/hash-scripts-loader

Load scripts with a #hash in Core.

latest
Source
npmnpm
Version
1.0.6
Version published
Maintainers
5
Created
Source

hash-scripts-loader

Load scripts with a #hash in Core.

Install

Install module

npm install @abcnews/hash-scripts-loader

Put in code

import loadScripts from "@abcnews/hash-scripts-loader";
loadScripts();

Usage

Put something like #interactivescriptsENCODEDldhgjldkjg3lk43nlkjbnsdlkfn in a CoreMedia article. With the encoded string being a base-36-props string. Use the base 36 converter to get the string.

Use the following pattern.

{"scripts": ["https://path.to.your.com/script.js"]}

Multiple scripts supported. eg.

{
  "scripts": [
    "https://path.to.your.com/script.js",
    "https://path.to.another.com/script.js"
  ]
}

Proxy

When using the preview site you can proxy a local script using proxy and proxyencoded query strings.

  • ?proxy=https://ws204914.aus.aunty.abc.net.au:8000/index.js seems to work only on https://master-news-web.news-web-preview.presentation-layer.abc-prod.net.au domain NOT nucwed
  • ?proxyencoded=5flhz4us1jwv2ryyloaj9zytj0scx2zv3at3b2mgy8p2gnwf1xw1araikd8atfti1h6hfse65289hftsamn2oco3e5tcin6trz542ef1 with the encoded string something like the following (works in nucwed preview):
{ "scripts": ["https://ws246352.aus.aunty.abc.net.au:8000/index.js"] }

Use this base36 encoding tool to get the string.

Standalone loader

Attach this standalone JavaScript file to your CoreMedia article to use this loader in Presentation Layer.

To do this, create a new JavaScript document and paste the URL into the URL field and check it in. Then attach the JS document in your article.

https://www.abc.net.au/res/sites/news-projects/interactive-loader/1.1.2/index.js

Note: Currently only works if Odyssey PL JS is also attached to the article

FAQs

Package last updated on 25 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts