urlEncodeGBK.js

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

Tätä skriptiä ei tulisi asentaa suoraan. Se on kirjasto muita skriptejä varten sisällytettäväksi metadirektiivillä // @require https://update.greasyfork.org/scripts/427724/939166/urlEncodeGBKjs.js.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Tekijä
PYUDNG
Versio
0.0.1.20210609184829
Luotu
9.6.2021
Päivitetty
9.6.2021
Size
589 kt
Lisenssi
N/A

urlEncodeGBK.js

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

新增的全局方法:

encodeURI_GBKencodeURIComponent_GBK
encodeURIencodeURIComponent未改动,仍可使用

效果:

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

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

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