Hi,
How i can stop loading web page from my extension?
I try use this, but it's don't work:
Please help!PHP Code:chrome.tabs.onUpdated.addListener(function(tabid, info, tab)
{
window.stop();
});
sorry for my english
This is a discussion on How to stop loading page within the Plugins Development section, part of the Chrome Plugins category: Hi, How i can stop loading web page from my extension? I try use this, but it's don't work: PHP ...
Hi,
How i can stop loading web page from my extension?
I try use this, but it's don't work:
Please help!PHP Code:chrome.tabs.onUpdated.addListener(function(tabid, info, tab)
{
window.stop();
});
sorry for my english
chrome.tabs.* is only available in views, while the way you're executing window.stop() would be applicable to a Content Script.
So first, what are you trying to do this in? A Content Script or a Background Page?
With a Content Script, you don't even need the onUpdated or anything cause it's only loaded when the page is. Just set "run_at" to "document_start" in the manifest for that script.
With a Background Page, you will need to inject the script via:
where you have the window.stop() now.Code:chrome.tabs.executeScript(tabid,{"code": "window.stop();"})
~ Projects ~
Specialized: Carapass Auction Watcher, Kongregate Chat
Libraries: bliplib
Tools: manifest syntax highlighting & snippits
~ Happy to make extensions for pay too ;D ~
Portfolio: Search and Share
I used the "Content Script".
Part of Manifest:
myjs.js:PHP Code:"Content_scripts": [
(
"Matches": ["http:// */*"],
"Js": ["myjs.js"],
"Run_at": "document_start"
)
]
and it works!PHP Code:window.stop ()
Waha, thank you!