No Middle Man

By Albert Bachand Last update Jun 19, 2005 — Installed 4,533 times.

Add support for https

in
Subscribe to Add support for https 2 posts, 2 voices



torotil Scriptwright
FirefoxX11

Hi!

I've tested this script and found that it does not work with https-links. To add support the line with "start = ..." has to be complemented to look like this:

// find the start of the (last) real url
start = Math.max(temp.lastIndexOf('http%3a'),
temp.lastIndexOf('http%253a'),
temp.lastIndexOf('http:'),
temp.lastIndexOf('https%3a'),
temp.lastIndexOf('https%253a'),
temp.lastIndexOf('https:'));

It seems to work fine otherwise though ;)

 
apieus User
FirefoxWindows

I've done it adding :
if (start <= 0) {
// special case: for https
start = Math.max(temp.lastIndexOf('https%3a'),
temp.lastIndexOf('https%253a'),
temp.lastIndexOf('https:'));
}

just after this :
// find the start of the (last) real url
start = Math.max(temp.lastIndexOf('http%3a'),
temp.lastIndexOf('http%253a'),
temp.lastIndexOf('http:'));

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel