From a1f1771b3aac667dc93f3affa5b2bcd7664ab160 Mon Sep 17 00:00:00 2001 From: gently <1243610+gentlyxu@users.noreply.github.com> Date: Wed, 14 Oct 2020 23:37:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9easylist=E5=A4=B4=E9=83=A8?= =?UTF-8?q?=E6=B3=A8=E9=87=8A=E9=83=A8=E5=88=86=E7=9A=84=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E3=80=82=20#255?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- anti-ad-easylist.txt | 8 ++++---- scripts/lib/writerFormat.class.php | 2 +- scripts/tools/easylist-extend.php | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/anti-ad-easylist.txt b/anti-ad-easylist.txt index 405ce6a9..17a862f8 100644 --- a/anti-ad-easylist.txt +++ b/anti-ad-easylist.txt @@ -1,7 +1,7 @@ -!TITLE=anti-AD -!VER=20201014231058 -!URL=https://github.com/privacy-protection-tools/anti-AD -!TOTAL_LINES=35309 +!Title: anti-AD +!Version: 20201014233426 +!Homepage: https://github.com/privacy-protection-tools/anti-AD +!Total lines: 35309 ||*.wap.xsbiquge.com^ ||*p2p*douyucdn.cn^ ||*serror*.wo.com.cn^ diff --git a/scripts/lib/writerFormat.class.php b/scripts/lib/writerFormat.class.php index cb1ab28c..be951be9 100644 --- a/scripts/lib/writerFormat.class.php +++ b/scripts/lib/writerFormat.class.php @@ -39,7 +39,7 @@ class writerFormat{ /*easylist 兼容格式的屏蔽广告列表*/ const EASYLIST = array( 'format' => '||{DOMAIN}^', - 'header' => "!TITLE=anti-AD\n!VER={DATE}\n!URL={URL}\n!TOTAL_LINES=00000\n", + 'header' => "!Title: anti-AD\n!Version: {DATE}\n!Homepage: {URL}\n!Total lines: 00000\n", 'full_domain' => 0, 'name' => 'easylist', 'filename' => '../anti-ad-easylist.txt', diff --git a/scripts/tools/easylist-extend.php b/scripts/tools/easylist-extend.php index c9a9d3c1..54e972c1 100644 --- a/scripts/tools/easylist-extend.php +++ b/scripts/tools/easylist-extend.php @@ -267,7 +267,7 @@ while(!feof($src_fp)){ continue; } - if(($row{0} === '!') && (substr($row, 0, 13) === '!TOTAL_LINES=')){ + if(($row{0} === '!') && (substr($row, 0, 13) === '!Total lines:')){ $insert_pos = $written_size; } @@ -361,7 +361,7 @@ foreach($ARR_WHITE_RULE_LIST as $row => $v){ } if(($insert_pos > 0) && (fseek($new_fp, $insert_pos) === 0)){ - fwrite($new_fp, "!TOTAL_LINES={$line_count}\n"); + fwrite($new_fp, "!Total lines: {$line_count}\n"); } fclose($src_fp);