Open the F**king URL Right Now

自动跳转某些网站不希望用户直达的外链

< Părere la script-ul Open the F**king URL Right Now

Recenzie: Bun, script-ul merge

如果 URL 不以 / 结尾会自动加上 /, 然后就 404 了(部分网站)

临时解决方法是在 redirect 函数跳转之前加上

if (trueURL.endsWith('/')) {
      trueURL = trueURL.slice(0, -1); // 多了个 slice(0, -1) 以避免未曾预料的 / 的自动添加
  }

就是 258 行后面

OldPandaAutor
§
Postat în: 19-10-2023

谢谢指出!

OldPandaAutor
§
Postat în: 27-11-2023

如果 URL 不以 / 结尾会自动加上 /, 然后就 404 了(部分网站)

临时解决方法是在 redirect 函数跳转之前加上

if (trueURL.endsWith('/')) {
trueURL = trueURL.slice(0, -1); // 多了个 slice(0, -1) 以避免未曾预料的 / 的自动添加
}

就是 258 行后面

你好,方便给一个示例链接吗?我想详细了解一下这个问题,单纯地删掉末尾的 / 似乎并不能根治

Postează un raspuns

Autentifică-te pentru a posta un răspuns.