Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #30898

Re: [Browser] How to replace strings in a URL with a javascript boormarklet?

Newsgroups comp.lang.javascript
Date 2016-07-19 08:10 -0700
References <fe04be32-6355-40e1-9ba4-f656650a1612@googlegroups.com> <XnsA649EE145C3BEeejj99@194.109.6.166>
Message-ID <7efb128d-dbde-48ec-9f49-edc7fb99ff95@googlegroups.com> (permalink)
Subject Re: [Browser] How to replace strings in a URL with a javascript boormarklet?
From arpegiateur@gmail.com

Show all headers | View raw


Wow! That works amazing, and with much less code than I imagined. Still, and I'm not trying to streching it here, but could you transform that into those bookmarklets that start with "javascript:" so that I could just click on it the moment the url shortener page appeared;  instead of opening your html file, go to the shortened page, drag the link to your html and click on it?

If you could do it, awsome, if not, amazing job anyway, because you already saved me a lot of frustration and time :-)

Cheers, and tank you again.




On Monday, July 18, 2016 at 10:24:16 PM UTC+1, Evertjan. wrote:
> arpegiateur[at]gmailDOTcom wrote on 18 Jul 2016 in comp.lang.javascript:
> > I regularly visit a site that is using and abusing more and more of
> > those links protectors where you have to wait -with the tab in focus or
> > the timer won't run-, only to open another link protector where you have
> > to proof you're not a robot, then choose from a collection of images the
> > ones that have trees (oh yes), and then wait a few more seconds to
> > finally open the damn link, only to find that sometimes it doesn't have
> > what I wanted (music album previews). 
> > 
> > I have 160 links to process and I refuse to go through all this
> > everytime. 
> > 
> > The link is something like this:
> > 
> > http://sh.st/r/54a92df92a7214a3b10b7be0308d9088/12/1/http://ouo.io/s/7GRM
> > eb12/?s=http%3A%2F%2Fwww.amazon.co.uk%2Fgp%2Fproduct%2FB01AJ05PXC%3Fkeywo
> > rds%3DLust%2520for%2520Youth%2520-%2520Compassion%26qid%3D1456989377%26re
> > f_%3Dsr_1_1%26sr%3D8-1 
> [..]
> > 
> > My objective is to have a bookmarklet, a bookmark with javascript code
> > in it that with just one click, grabbs the current double protected
> > link, filters out the trash in it, substitutes hex strings with the
> > correct values, and finally navigates to that link. I'm sure this is
> > easy for someone with average knowledge of javascript. 
> 
> <!DOCTYPE html>
> <html><head>
> <script>
> function decode(t) {
> location.href=decodeURIComponent(t.value.replace(/^.*(http)/,'$1'));
> };
> </script>
> </head><body>
> 
> Drop or paste the code in the textarea and then click on it:
> 
> <br><br>
> <textarea onclick='decode(this)' style='height:200px;width:500px;'>
> </textarea>
> </body></html>
> 
> 
> 
> 
> -- 
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress)

Back to comp.lang.javascript | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[Browser] How to replace strings in a URL with a javascript boormarklet? arpegiateur@gmail.com - 2016-07-18 13:42 -0700
  Re: [Browser] How to replace strings in a URL with a javascript boormarklet? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-07-18 23:24 +0200
    Re: [Browser] How to replace strings in a URL with a javascript boormarklet? arpegiateur@gmail.com - 2016-07-19 08:10 -0700
      Re: [Browser] How to replace strings in a URL with a javascript boormarklet? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-07-19 19:49 +0200
        Re: [Browser] How to replace strings in a URL with a javascript boormarklet? arpegiateur@gmail.com - 2016-07-19 13:34 -0700
          Re: [Browser] How to replace strings in a URL with a javascript boormarklet? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-07-20 09:39 +0200
            Re: [Browser] How to replace strings in a URL with a javascript boormarklet? arpegiateur@gmail.com - 2016-07-20 10:09 -0700
              Re: [Browser] How to replace strings in a URL with a javascript boormarklet? Osmo Saarikumpu <osmo@weppipakki.com> - 2016-07-21 16:21 +0300
                Re: [Browser] How to replace strings in a URL with a javascript boormarklet? Osmo Saarikumpu <osmo@weppipakki.com> - 2016-07-21 16:36 +0300
                Re: [Browser] How to replace strings in a URL with a javascript boormarklet? arpegiateur@gmail.com - 2016-07-22 12:19 -0700
                Re: [Browser] How to replace strings in a URL with a javascript boormarklet? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-07-22 23:20 +0200
                Re: [Browser] How to replace strings in a URL with a javascript boormarklet? arpegiateur@gmail.com - 2016-07-22 18:13 -0700
                Re: [Browser] How to replace strings in a URL with a javascript boormarklet? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-07-23 12:02 +0200
                Re: [Browser] How to replace strings in a URL with a javascript boormarklet? arpegiateur@gmail.com - 2016-07-26 11:49 -0700
                Re: [Browser] How to replace strings in a URL with a javascript boormarklet? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-07-27 00:20 +0200
                Re: [Browser] How to replace strings in a URL with a javascript boormarklet? arpegiateur@gmail.com - 2016-07-28 08:07 -0700
                Re: [Browser] How to replace strings in a URL with a javascript boormarklet? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-07-28 19:24 +0200
                Re: [Browser] How to replace strings in a URL with a javascript boormarklet? arpegiateur@gmail.com - 2016-07-28 14:44 -0700
                Re: [Browser] How to replace strings in a URL with a javascript boormarklet? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-07-29 00:29 +0200
                Re: [Browser] How to replace strings in a URL with a javascript boormarklet? arpegiateur@gmail.com - 2016-07-30 07:53 -0700
                Re: [Browser] How to replace strings in a URL with a javascript boormarklet? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-07-30 17:59 +0200
                Re: [Browser] How to replace strings in a URL with a javascript boormarklet? arpegiateur@gmail.com - 2016-08-03 08:03 -0700
                Re: [Browser] How to replace strings in a URL with a javascript boormarklet? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-08-03 10:05 -0700
                Re: [Browser] How to replace strings in a URL with a javascript boormarklet? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-08-03 23:38 +0200
                Re: [Browser] How to replace strings in a URL with a javascript boormarklet? arpegiateur@gmail.com - 2016-08-04 13:09 -0700
                Re: [Browser] How to replace strings in a URL with a javascript boormarklet? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-08-04 22:37 +0200
                Re: [Browser] How to replace strings in a URL with a javascript boormarklet? arpegiateur@gmail.com - 2016-08-05 10:54 -0700
                Re: [Browser] How to replace strings in a URL with a javascript boormarklet? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-08-05 20:31 +0200
  Re: [Browser] How to replace strings in a URL with a javascript boormarklet? Aleksandro <aleksandro@gmx.com> - 2016-07-19 15:45 -0400
    Re: [Browser] How to replace strings in a URL with a javascript boormarklet? arpegiateur@gmail.com - 2016-07-19 13:40 -0700
    Re: [Browser] How to replace strings in a URL with a javascript boormarklet? arpegiateur@gmail.com - 2016-07-19 13:41 -0700

csiph-web