@nlo/ping-video-loader
Advanced tools
Comparing version 0.0.1-alpha.81 to 0.0.1-alpha.82
@@ -5,5 +5,7 @@ declare global { | ||
pingvp?: any; | ||
jQuery?: any; | ||
$?: any; | ||
} | ||
} | ||
declare class PingVideoPlayerLoader { | ||
declare class PingVideoLoader { | ||
loadVideo(elementId: string, videoName: string, autoStart: boolean): Promise<unknown> | undefined; | ||
@@ -14,3 +16,3 @@ private awaitElementLoad; | ||
} | ||
declare const _default: PingVideoPlayerLoader; | ||
declare const _default: PingVideoLoader; | ||
export default _default; |
@@ -6,6 +6,6 @@ "use strict"; | ||
var scriptIsCreated = false; | ||
var PingVideoPlayerLoader = /** @class */ (function () { | ||
function PingVideoPlayerLoader() { | ||
var PingVideoLoader = /** @class */ (function () { | ||
function PingVideoLoader() { | ||
} | ||
PingVideoPlayerLoader.prototype.loadVideo = function (elementId, videoName, autoStart) { | ||
PingVideoLoader.prototype.loadVideo = function (elementId, videoName, autoStart) { | ||
var _this = this; | ||
@@ -29,3 +29,3 @@ var targetElement = document.getElementById(elementId); | ||
}; | ||
PingVideoPlayerLoader.prototype.awaitElementLoad = function (targetElement, resolve) { | ||
PingVideoLoader.prototype.awaitElementLoad = function (targetElement, resolve) { | ||
var checkElementLoaded = setInterval(function () { | ||
@@ -38,12 +38,14 @@ if (targetElement.childNodes.length) { | ||
}; | ||
PingVideoPlayerLoader.prototype.createScriptTag = function () { | ||
PingVideoLoader.prototype.createScriptTag = function () { | ||
if (scriptIsCreated) { | ||
return; | ||
} | ||
// The PingVP script checks for jQuery but uses $, so this ensures that the alias is always set | ||
window.$ = window.jQuery; | ||
var tag = document.createElement('script'); | ||
tag.src = "https://www.pingvp.com/p/aXNejdEHiu"; | ||
tag.src = 'https://www.pingvp.com/p/aXNejdEHiu'; | ||
document.body.appendChild(tag); | ||
scriptIsCreated = true; | ||
}; | ||
PingVideoPlayerLoader.prototype.loadPingVpAsync = function () { | ||
PingVideoLoader.prototype.loadPingVpAsync = function () { | ||
if (pingVideoPlayerIsLoaded && window.pingVpLoader) { | ||
@@ -65,4 +67,4 @@ window.pingVpLoader(); | ||
}; | ||
return PingVideoPlayerLoader; | ||
return PingVideoLoader; | ||
}()); | ||
exports.default = new PingVideoPlayerLoader(); | ||
exports.default = new PingVideoLoader(); |
{ | ||
"name": "@nlo/ping-video-loader", | ||
"version": "0.0.1-alpha.81+691c95f", | ||
"version": "0.0.1-alpha.82+d957b39", | ||
"description": "", | ||
@@ -23,3 +23,3 @@ "main": "dist/index.js", | ||
}, | ||
"gitHead": "691c95ff4d5df5ad733635a12312abe0bc3fe788" | ||
"gitHead": "d957b39fa509ea2e5dd89eba787eb50da57646e0" | ||
} |
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
4190
91
1