修改easylist头部注释部分的格式。 #255

This commit is contained in:
gently 2020-10-14 23:37:55 +08:00
parent e68914d679
commit a1f1771b3a
3 changed files with 7 additions and 7 deletions

View File

@ -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^

View File

@ -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',

View File

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