Welcome guest, is this your first visit? Create Account now to join.
Results 1 to 3 of 3

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 ...


  1. #1
    RioTiZ is offline Junior Member
    Join Date
    Aug 2010
    Posts
    2

    Question How to stop loading page

    Hi,
    How i can stop loading web page from my extension?

    I try use this, but it's don't work:

    PHP Code:
    chrome.tabs.onUpdated.addListener(function(tabidinfotab)
    {
         
    window.stop();
    }); 
    Please help!


    sorry for my english

  2. #2
    Waha's Avatar
    Waha is offline Senior Member
    Join Date
    Apr 2009
    Location
    Oregon
    Posts
    788

    Default

    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:
    Code:
    chrome.tabs.executeScript(tabid,{"code": "window.stop();"})
    where you have the window.stop() now.
    ~ 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

  3. #3
    RioTiZ is offline Junior Member
    Join Date
    Aug 2010
    Posts
    2

    Default

    I used the "Content Script".

    Part of Manifest:
    PHP Code:
      "Content_scripts": [
        (
         
    "Matches": ["http:// */*"],
         
    "Js": ["myjs.js"],
         
    "Run_at""document_start"
        
    )
      ] 
    myjs.js:
    PHP Code:
    window.stop () 
    and it works!
    Waha, thank you!

Similar Threads

  1. Need Stop Audio plugin!!!
    By alex91pp in forum Plugins Development
    Replies: 1
    Last Post: 03-29-2010, 12:00 PM
  2. stop crash recovery
    By jHughes in forum Chrome Troubleshooting
    Replies: 1
    Last Post: 01-14-2010, 01:48 AM
  3. Page loading problems...please help...
    By walking101 in forum Bugs and Vulnerabilities
    Replies: 0
    Last Post: 01-21-2009, 04:53 PM
  4. How do I get the browser to stop loading a page?
    By jpjgolden in forum Chrome Troubleshooting
    Replies: 2
    Last Post: 01-06-2009, 04:49 PM
  5. Chrome stalls while loading a page
    By Walt Johnson in forum Chrome Talk
    Replies: 1
    Last Post: 12-23-2008, 07:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •