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);