Home Chrome Extension Blank
Reply: 0

Chrome Extension Blank

Kayla Siemon
1#
Kayla Siemon Published in 2017-12-07 22:35:17Z

I am trying to load a page that will search the domain of your current tab into this url: "https://www.owler.com/iaApp/browsecompanyprofiles.htm?searchTerm=" + window.location.hostname.

It works in Editors I have used online like JSbin, etc but whenever I upload it into google, it is a blank white pop up. What Im I missing. I know that I shouldn't have script in my popup.html so I created a seperate file but it still isn't working.

This is my js and html file.

function newDoc() {
   window.location.assign("https://www.owler.com/iaApp/browsecompanyprofiles.htm?searchTerm=" + window.location.hostname)
}

document.addEventListener('DOMContentLoaded', function() {
  newDoc();
});
<!DOCTYPE html>
<html>
	<head>
	</head>
<body>
<script id="jsbin-javascript">
function newDoc() {
   window.location.assign("https://www.owler.com/iaApp/browsecompanyprofiles.htm?searchTerm=" + window.location.hostname)
}

document.addEventListener('DOMContentLoaded', function() {
  newDoc();
});
</script>



<script id="jsbin-source-javascript" type="text/javascript">function newDoc() {
   window.location.assign("https://www.owler.com/iaApp/browsecompanyprofiles.htm?searchTerm=" + window.location.hostname)
}

document.addEventListener('DOMContentLoaded', function() {
  newDoc();
});
</script></body>
</html>

<style>
html, body{
 width: 350px;
    height: 600px;
    border: none;
    margin: 0px;
    padding: 0px;
}
</style>

mainfest.json:

 {
  "manifest_version": 2,

  "name": "Owler",
  "description": "Pull company information from any URL",
  "version": "1.0",
"icons": {
        "48": "icon-48.png",
        "128": "icon-100.png"
    },  
"permissions": [
              "activeTab", "tabs", "<all_urls>"
             ],
 "browser_action": {
 "default_icon": "icon.png",
 "default_popup": "popup.html"
}
}
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.307205 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO