Results 1 to 4 of 4

This is a discussion on Webpage Customization? within the Chrome Talk section, part of the Google Chrome category: Hi, is there any way to customize a webpage while it's loading? I tried adding a javascript that would e.g. ...


  1. #1
    Manatsu is offline Junior Member
    Join Date
    Jan 2010
    Posts
    2

    Default Webpage Customization?

    Hi,

    is there any way to customize a webpage while it's loading?
    I tried adding a javascript that would e.g. make thumbnail pictures bigger

    But it usually was like, webpage loads, everything is displayed and then the thumbnail pictures got replaced.

    I wonder is there any way to customize it earlier in the loading process? So before swap the picture url's before it even starts to load the old pictures?

  2. #2
    sulasno's Avatar
    sulasno is offline Super Moderator
    Join Date
    Sep 2008
    Location
    Bangkok
    Posts
    1,759

    Default

    Welcome to ChromePlugins

    I think sites need to be fully loaded before java kicks in

  3. #3
    PAEz's Avatar
    PAEz is offline Moderator
    Join Date
    Aug 2009
    Location
    Australia
    Posts
    656

    Default

    If your talking about making an extension then next time could you please post your question in the plugins development section so as we know what context to take the question in.
    Assuming this is about extensions....
    Try changeing the run_at bit of your manifest to document_end. Your page may very well still be loading pictures when your script runs but it will be alot sooner than the default for run_at which is document_idle. Your only other option is document_start but the DOM isnt even created then and you cant get the source for the page mess with it and give it back to chrome to render the DOM (pity, that would be so f### cool). If your real dessperate you could maybe do a timer thingie at document start to keep running a function every few milliseconds to keep checking to see if the dom is created yet and then use another function to keep checking the dom to see if any of your elements have been created and change them. Or I think theres some Events to see if an element has been added and you could hook into them once the dom has been created (their called Mutation Events, but how much chrome supports them and whether they would be what you need I cant say)....but that could get messy...I dont know, never done this, just thinking out loud
    More information.......
    http://code.google.com/chrome/extens...t_scripts.html
    http://www.howtocreate.co.uk/tutoria...ript/domevents (love this site)

  4. #4
    Manatsu is offline Junior Member
    Join Date
    Jan 2010
    Posts
    2

    Default

    Quote Originally Posted by PAEz View Post
    If your talking about making an extension then next time could you please post your question in the plugins development section so as we know what context to take the question in.
    Assuming this is about extensions....
    Try changeing the run_at bit of your manifest to document_end. Your page may very well still be loading pictures when your script runs but it will be alot sooner than the default for run_at which is document_idle. Your only other option is document_start but the DOM isnt even created then and you cant get the source for the page mess with it and give it back to chrome to render the DOM (pity, that would be so f### cool). If your real dessperate you could maybe do a timer thingie at document start to keep running a function every few milliseconds to keep checking to see if the dom is created yet and then use another function to keep checking the dom to see if any of your elements have been created and change them. Or I think theres some Events to see if an element has been added and you could hook into them once the dom has been created (their called Mutation Events, but how much chrome supports them and whether they would be what you need I cant say)....but that could get messy...I dont know, never done this, just thinking out loud
    More information.......
    http://code.google.com/chrome/extens...t_scripts.html
    http://www.howtocreate.co.uk/tutoria...ript/domevents (love this site)
    Well yeah I was kinda looking for a Way to mess with the source and stuff before the resources (images, flash etc) are being loaded and before it starts building the website.

    Maybe even as far as having an algorithm that cuts out information of the original website and provides this information for a customized template that is being used to build the DOM and stuff

    I'd like it if webpages would do that themself; but yeah then you could remove ads and stuff and they probably wouldn't like that
    Last edited by Manatsu; 01-15-2010 at 03:55 PM.

Similar Threads

  1. Chrome - This webpage is not available error
    By Googled in forum Chrome Troubleshooting
    Replies: 11
    Last Post: 09-22-2009, 03:21 PM
  2. unable to see any webpage
    By cyberonium in forum General Chat
    Replies: 2
    Last Post: 06-01-2009, 03:34 AM
  3. chrome doesn't show form in webpage
    By crazylit in forum Bugs and Vulnerabilities
    Replies: 1
    Last Post: 10-11-2008, 01:19 PM
  4. Webpage not complete displayed
    By wdwpower in forum Bugs and Vulnerabilities
    Replies: 0
    Last Post: 09-17-2008, 04:16 PM
  5. Chromeplugins webpage not displaying properly
    By kausikdatta in forum Bugs and Vulnerabilities
    Replies: 4
    Last Post: 09-14-2008, 01:54 AM

Posting Permissions

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