Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pelagiccreatures/sargasso

Package Overview
Dependencies
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pelagiccreatures/sargasso - npm Package Compare versions

Comparing version 0.7.2 to 0.7.3

example/injected.js

17

lib/HijaxLoader.js

@@ -118,3 +118,19 @@ /**

processScripts (scripts) {
Array.from(scripts).forEach((script) => {
script.remove()
const id = script.getAttribute('id')
if (!document.getElementById(id)) {
// script.onload = function () {}
document.getElementsByTagName('head')[0].appendChild(script)
}
})
}
mergePage (html) {
const ephemerals = document.querySelectorAll('[data-ephemeral]')
Array.from(ephemerals).forEach((ephemeral) => {
ephemeral.remove()
})
const doc = html.split(/(<body[^>]*>|<\/body>)/ig)

@@ -127,2 +143,3 @@ const fragment = makeFragment(doc[2])

const replace = fragment.getElementById(id)
this.processScripts(replace.querySelectorAll('script'))
const frame = () => {

@@ -129,0 +146,0 @@ container.parentNode.replaceChild(replace, container)

2

package.json
{
"name": "@pelagiccreatures/sargasso",
"version": "0.7.2",
"version": "0.7.3",
"description": "Simple, Fast, Reactive, supervised Javascript controllers for html elements.",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc