D
Danny
I have 4 separate websites, each with their own development address
I have a bookmarklet that replaces the first part of the URL with the
development page, but keeps the path and file name, which allows me to
jump back and forth between development and live without having to
retype anything.
I would like to create a bookmarklet that contains code for all 4
sites and their respective development pages.
I would like to create 4 scripts like the one below, each containing a
different site name, but combine it into the same bookmarklet.
javascript:k=location.href;m=document.domain;n="www.thisisatest.com";
p="thisisatest.dev.thisisatest.com";if(document.domain==n)
{k=k.replace(m,p);}else{k=k.replace(m,n)}location.href=k;
Any suggestions?
I've tried to separate the code with a semicolon, but it did not work.
Thanks
I have a bookmarklet that replaces the first part of the URL with the
development page, but keeps the path and file name, which allows me to
jump back and forth between development and live without having to
retype anything.
I would like to create a bookmarklet that contains code for all 4
sites and their respective development pages.
I would like to create 4 scripts like the one below, each containing a
different site name, but combine it into the same bookmarklet.
javascript:k=location.href;m=document.domain;n="www.thisisatest.com";
p="thisisatest.dev.thisisatest.com";if(document.domain==n)
{k=k.replace(m,p);}else{k=k.replace(m,n)}location.href=k;
Any suggestions?
I've tried to separate the code with a semicolon, but it did not work.
Thanks