Add trusted-cloud lander generator with TDS and RId-preserving JS redirect

This commit is contained in:
n0mad1k
2026-06-25 10:19:10 -04:00
parent aa303cae8c
commit 4d011e2d96
3 changed files with 145 additions and 0 deletions
@@ -0,0 +1,11 @@
(function() {
var u = new URLSearchParams(window.location.search);
var src = u.get('u') || '';
var dest = {{ redirect_url | tojson }};
if (src.indexOf('rid=') !== -1 || src.indexOf('RId=') !== -1) {
var params = new URLSearchParams(new URL(decodeURIComponent(src)).search);
var rid = params.get('rid') || params.get('RId');
if (rid) dest += (dest.indexOf('?') !== -1 ? '&' : '?') + 'rid=' + encodeURIComponent(rid);
}
window.location.replace(dest);
})();