ShadowSocks 默认使用的 [GFWList][1] 规则,这里有一份 [gfwlist2pac][2]。
ShadowSocks 默认使用的是 adblock plus 的引擎,要想自己添加规则最好熟悉一下其规则,下面是ShadowSocks 的 pac 规则。
中文版: [Adblock Plus 过滤规则][3] 英文版: [Adblock Plus filters explained][4]
String.prototype.queryURLParams = function () { | |
let obj = {}, | |
reg = /([^?=&#]+)=([^?=&#]+)/g; | |
this.replace(reg, function () { | |
// arguments[0] === this | |
const key = arguments[1]; | |
obj[key] = arguments[2]; | |
}); | |
return obj; | |
}; |
////////////////////////// | |
Object.defineProperty(Array.prototype, 'group', { | |
enumerable: false, | |
value: function (key) { | |
var map = {}; | |
this.forEach(function (e) { | |
var k = key(e); | |
map[k] = map[k] || []; | |
map[k].push(e); | |
}) |
@charset "utf-8"; /*表示定义CSS文件的字符编码格式为"utf-8"*/ | |
/*为HTML元素定义样式:字体颜色为黑色,背景颜色为白色,字体类型为"微软雅黑、sans-serif、Arial"三种*/ | |
html { | |
color: #000; | |
background: #fff; | |
font-family: 'Microsoft YaHei', sans-serif, Arial; | |
} | |
/*为body、div等元素设置内边距为零、外边距为零、字体类型为"微软雅黑、sans-serif、Arial"三种*/ | |
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, button, textarea, p, blockquote, th, td, strong { |
let arr; | |
let arr1, arr2, myList; | |
// [数组] | |
// 遍历数据 | |
[1, 2, 3].forEach((value, index) => { | |
console.log(value, index); | |
}); | |
// 映射新数据 | |
arr = [1, 2, 3].map(v => v * 2); | |
// 所有元素是否通过测试 |
{"lastUpload":"2021-01-11T02:57:24.487Z","extensionVersion":"v3.4.3"} |
<template> | |
<div class="container"> | |
<template v-for="(item, idx) in list"> | |
<div class="item" :key="item.id"> | |
<i class="icon" @click="() => {onRemove(idx)}"> | |
<i class="icon-del"></i> | |
</i> | |
<span class="desc">{{item.name}}</span> | |
</div> | |
<i class="separtor" v-if="list.length -1 > idx" :key="item.id"></i> |
import styled, { css } from ‘styled-components’; | |
export const DefaultInput = styled.input` | |
border: 1px solid ${({error})=>( error ? `red` : `grey` )}; | |
border-radius: 4px; | |
outline: none; | |
padding: 0.5em; | |
`; | |
export const SecondComponent = styled(DefaultInput)` |