Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #30952
| Newsgroups | comp.lang.javascript |
|---|---|
| Date | 2016-07-20 10:09 -0700 |
| References | (1 earlier) <XnsA649EE145C3BEeejj99@194.109.6.166> <7efb128d-dbde-48ec-9f49-edc7fb99ff95@googlegroups.com> <XnsA64AC9985FA77eejj99@194.109.6.166> <0a3eba30-0511-4cb4-b191-11623ec1fcbc@googlegroups.com> <XnsA64B625527832eejj99@194.109.6.166> |
| Message-ID | <a52bb885-677d-45c2-b6d7-6d724603ec02@googlegroups.com> (permalink) |
| Subject | Re: [Browser] How to replace strings in a URL with a javascript boormarklet? |
| From | arpegiateur@gmail.com |
On Wednesday, July 20, 2016 at 8:40:04 AM UTC+1, Evertjan. wrote:
>
> This NG is NOT a Google-group but a Usenet group, and even predates Google
> by decennia. Usenet even predates the World-Wide-Web by over a decennium.
>
> Google may well be devoid of any etiquette,
> but Usenet "Netiquette" is something else.
>
> Seems you are using a Google-groups server as a web-newsreader into Usenet,
> without realizing its hidden, and therefore quite dirty, potential.
Ok, it says Google Groups in this left panel, but I guess is just a front end then. But I find it easier to search for topics like these, although I hate that it doesn't let me edit a post once I send it.
What dirty potential are you talking about? The data that google gathers?
> Where? Should I register for that to log in?
> That is something we usenetters are very reluctant to do.
The translate bookmarklet:
javascript:var%20t=((window.getSelection&&window.getSelection())||(document.getSelection&&document.getSelection())||(document.selection%20&&document.selection.createRange&&document.selection.createRange().text));var%20e=(document.charset||document.characterSet);if(t!=''){location.href='http://translate.google.com/translate_t?text='+t+'&hl=en&tbb=1&ie='+e;}else{location.href='http://translate.google.com/translate?u='+escape(location.href)+'&hl=en&tbb=1&ie='+e;};
...it will translate any non-english webpage into english, just put that code into a new bookmark, open the page you want to translate, click that bookmark, and presto you'll have that page in english, with *no google login required*, don't worry :).
It works with private browser sessions too. I hope you find it useful.
> Well, you can take the essence of my javascript code, and use it as you
> like, it seems you are the bookmarklet specialist here ;-)
>
> var source = '....';
> var result = decodeURIComponent(source.replace(/^.*(http)/,'$1'));
>
> this code throws away everything before the last 'http' [or "https" for that
> matter] and decodes the resulting string.
'Specialist' only in knowing their usefullness :D
All right, I'll try your last code suggestion.
Thank you for your work so far, it already helped a lot :)
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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