Skip to content

Commit

Permalink
Merge pull request #187 from hjdhnx/main
Browse files Browse the repository at this point in the history
add $js for t3
  • Loading branch information
Hiram-Wong authored May 4, 2024
2 parents 85b5899 + 606f8d5 commit d619828
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/renderer/src/utils/drpy/drpy3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const pre = () => {
let rule = {};
// @ts-ignore
let vercode = typeof pdfl === 'function' ? 'drpy3.1' : 'drpy3';
const VERSION = `${vercode} 3.9.50beta5 202400502`;
const VERSION = `${vercode} 3.9.50beta6 202400504`;
/** 已知问题记录
* 1.影魔的jinjia2引擎不支持 {{fl}}对象直接渲染 (有能力解决的话尽量解决下,支持对象直接渲染字符串转义,如果加了|safe就不转义)[影魔牛逼,最新的文件发现这问题已经解决了]
* Array.prototype.append = Array.prototype.push; 这种js执行后有毛病,for in 循环列表会把属性给打印出来 (这个大毛病需要重点排除一下)
Expand Down Expand Up @@ -150,6 +150,14 @@ const URLJOIN_ATTR = /(url|src|href|-original|-src|-play|-url|style)$/; // 需
const SELECT_REGEX = /:eq|:lt|:gt|#/g;
const SELECT_REGEX_A = /:eq|:lt|:gt/g;

// 增加$js工具,支持$js.toString(()=>{});
const $js = {
toString(func) {
let strfun = func.toString();
return strfun.replace(/^\(\)(\s+)?=>(\s+)?\{/, "js:").replace(/\}$/,'');
}
};

function window_b64() {
let b64map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
let base64DecodeChars = new Array(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1);
Expand Down Expand Up @@ -2847,6 +2855,7 @@ const keepUnUse = {
fixAdM3u8, fixAdM3u8Ai, // ad
base64Encode, md5, decodeStr, RSA, // encryption and decryption
clearItem, // cache
$js, // $工具
};
let temp = _;
temp.stringify({});
Expand Down

0 comments on commit d619828

Please sign in to comment.