urlEncodeGBK.js

js纯代码实现gbk格式的url编码

As of 09/06/2021. See the latest version.

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://updategreasyfork.deno.dev/scripts/427724/939165/urlEncodeGBKjs.js

Autor
PYUDNG
Verzija
0.0.1.20210609184829
Napravljeno
09/06/2021
Ažurirano
09/06/2021
Size
589 КБ
Licenca
Nije dostupno

urlEncodeGBK.js

js纯代码实现gbk格式的url编码

更改的方法:

encodeURIencodeURIComponent

效果:

引用前:encodeURI('中文') >> "%E4%B8%AD%E6%96%87"
引用后:encodeURI_GBK('中文') >> "%D6%D0%CE%C4"

来源:http://www.vuln.cn/2901

相较于原代码,修改了函数名称,使原生encodeURIencodeURIComponent依然可用;将变量GBKTable声明为常量