question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Client-side chrome extension compromise loading

See original GitHub issue
//Load compromise library
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "https://unpkg.com/compromise";
document.body.appendChild(script);
console.log('using compromise v. ' + window.nlp.version);
BackgroundPage.js:6 Uncaught TypeError: Cannot read property 'version' of undefined
    at BackgroundPage.js:6

I am trying to integrate Compromise into my extension but the client-side loading script seems not working properly. Any clue?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
spencermountaincommented, Apr 1, 2019

thank you Sebastian

1reaction
zzj0402commented, Apr 1, 2019

Looks like not luck still.

BackgroundPage.js:7 Uncaught TypeError: Cannot read property 'version' of undefined
    at HTMLScriptElement.script.onload (BackgroundPage.js:7)

Here is the code:

//Load compromise library
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "https://unpkg.com/compromise";
document.body.appendChild(script);
script.onload = function () {
      console.log('using compromise v. ' + window.nlp.version);
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Security implications of storing client-side generated ...
Data stored in chrome.storage.local is not encrypted in any way, ... computer are compromised, including your extension's storage data.
Read more >
Chrome Extensions Declare permissions
Permissions help to limit damage if your extension is compromised by malware. Some permissions are displayed to users for their consent ...
Read more >
ChromeLoader Infects the Browser by Loading Malicious ...
Often, the accidental installation of Trojan browser extensions can lead to the compromise of the user's device, and provide access to secondary ...
Read more >
Set Chrome policies for users or browsers - Google Support
For details, go to View and configure apps and extensions. Allow and block apps; Force-install apps; Pin apps to the taskbar. The application...
Read more >
The Most Effective Way to Protect Client-Side JavaScript ...
jscrambler-blog-protecting-client-side-javascript-applications ... therefore compromising the security of the original code.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found