Go Back   Google Chrome Forums > Google Chrome > Chrome Plugins


http://chromeplugins.org/frwrdicon.jpg
Top Tip : Click here to Boost Your PC & Chrome Browsing Speed
Reply
 
Thread Tools Display Modes
  #1  
Old 07-28-2009, 07:41 PM
Senior Member
 
Join Date: Jun 2009
Location: Porto Alegre, Brazil
Posts: 109
Default [Bookmarklet] Test a site in different resolutions

Did create this one today when I've found a site which simulates the different resolutions a screen can be - the online tool is provided by http://viewlike.us/.

It's pretty useful for webdesigners.

That small ER and everything else is just to be sure that http:// and the final / (bar) are removed upon click (by what I did test here those 2 things would result in a forbidden error there)

Here it's:

Code:
javascript:var%20end=window.location.href;end=end.replace(/http:\/\//,"");if(end.indexOf("/",end.length-1)!=-1){end=end.substr(0,end.length-1);}window.location.href="http://viewlike.us/?url="+end;

Last edited by NicholasPufal; 08-01-2009 at 06:47 PM.. Reason: Uppercase title's first letter
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 07-29-2009, 01:10 AM
Waha's Avatar
Senior Member
 
Join Date: Apr 2009
Location: Oregon
Posts: 590
Default

For future reference, if you want to just get the host URL (and no subpages) you can just use:
Code:
location.protocol+"//"+location.hostname
Or if you don't want the http like it doesn't seem you do, just use location.hostname
__________________
~ Projects ~
Specialized: Carapass Auction Watcher
Libraries: bliplib
Tools: manifest syntax highlighting & snippits
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 07-29-2009, 01:17 AM
Senior Member
 
Join Date: Jun 2009
Location: Porto Alegre, Brazil
Posts: 109
Default

Thanks Waha.

But the problem is that doing like that i'm not able to get sub sections from a website.

For example, let's say the page I'm in and want to take a screenshot is: http://www.site.com/anotherthinghere/articles/10 - if I just use localtion.hostname, that simply wouldn't work as expected.

The way it's now makes possible to have complex URLs there.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 07-29-2009, 05:59 AM
Waha's Avatar
Senior Member
 
Join Date: Apr 2009
Location: Oregon
Posts: 590
Default

Oh sorry it seemed like you were trying to clear off the subdirectories, but you were just getting rid of trailing /'s. ^^;
__________________
~ Projects ~
Specialized: Carapass Auction Watcher
Libraries: bliplib
Tools: manifest syntax highlighting & snippits
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot access site... mg2 Chrome Troubleshooting 17 11-30-2009 08:10 PM
Get site thumbnail / favicon Kyrax Chrome Tips & Tricks 6 11-09-2009 04:29 AM
Site homepage with some bad code? NicholasPufal Chrome Central 12 07-19-2009 10:57 AM
Pictures uploaded to this site Stamga General Chat 3 04-07-2009 01:27 AM
Tips from the main site Chrome Chrome Tips & Tricks 5 09-10-2008 03:13 PM




Chrome Central - Chrome Talk - Chrome Tips and Tricks - Chrome Plugins - Chrome Themes - Chrome Tools - Bugs and Vulnerabilities - Chrome Tech - General Chat


All times are GMT. The time now is 10:29 AM.


Powered by vBulletin® Version 3.7.4 PL1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Google Chrome and Google™ is a Trademark of Google Inc
This site chromeplugins.org is not affiliated with or sponsored by Google Inc.
Thanks: Taree SEO Forum and John