Joined January 2013
·
Posted to
No referer after redirect (Solved)
over 1 year
ago
Pure JS redirect.
var redirect = function(url) {
var dom = window.document.createElement('form');
var parts = url.split('?');
var url_ = parts[0], params = parts[1] || '';
var paramlist = params.split('&');
dom.setAttribute('method', 'get');
dom.setAttribute('action', url_);
dom.style.display = 'none';
dom.style.visibility = 'hidden';
var e, kv, k, v;
for (var i = 0; i < paramlist.length; ++i) {
kv = paramlist[i].split('=');
k = kv[0];
v = kv[1];
e = window.document.createElement('input');
e.setAttribute('type', 'hidden');
e.setAttribute('name', decodeURIComponent(k));
e.setAttribute('value', decodeURIComponent(v));
dom.appendChild(e);
}
window.document.body.appendChild(dom);
dom.submit();
}
Achievements
95 Karma
19,856 Total ProTip Views
Komodo Dragon
Have at least one original repo where Java is the dominant language
Nephila Komaci
Have at least one original repos where PHP is the dominant language
Walrus
The walrus is no stranger to variety. Use at least 4 different languages throughout all your repos
Forked
Have a project valued enough to be forked by someone else
Charity
Fork and commit to someone's open source project in need
Python 3
Have at least three original repos where Python is the dominant language
Python
Would you expect anything less? Have at least one original repo where Python is the dominant language
Cub
Have at least one original jQuery or Prototype open source repo
Now on official docs :) https://github.com/sshuttle/sshuttle/blob/master/docs/windows.rst