Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //popup.html
- <html>
- <body>
- <input type = "button" id = "the_button" value = "My button" onclick = "sayHi()"></input>
- </body>
- <script src = "popup.js" ></script>
- </html>
- //popup.js
- document.getElementById("the_button").addEventListener("click", function() {
- var win = window.open("http://www.roblox.com", "roblox", 400, 400)
- //this is where I'm having some problems
- win.ready(function() {
- console.log(win.location.href)
- })
- })
- //manifest.json
- {
- "manifest_version": 2,
- "name": "Test",
- "description": "Test Extension",
- "version": "1.0",
- "icons": {
- "48": "icon.png"
- },
- "permissions": [
- "http://*/*",
- "https://*/*"
- ],
- "content_scripts": [{
- "matches": ["http://*/*", "http://*/*"],
- "js": ["jquery.js", "popup.js"]
- }],
- "browser_action": {
- "default_title": "This is a test",
- "default_icon": "icon.png",
- "default_popup": "popup.html"
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment