You will need to install a user script manager extension to install this script.
This script should not be not be installed directly. It is a library for other scripts to include with the meta directive
// @require https://update.greasyfork.org/scripts/368137/601683/encodeToGb2312.js
This code is from https://github.com/liuxiaodong/encodeToGb2312
You can use like:
var result = encodeToGb2312("字符串转GB2312"); result: D7D6B7FBB4AED7AA474232333132
var result = encodeToGb2312("字符串转GB2312",true); result: %D7%D6%B7%FB%B4%AE%D7%AA%47%42%32%33%31%32