Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:网页插件¥js_url¥global_聚合搜索引擎切换导航[手机版][移动端]@base64://Ly8gPT1Vc2VyU2NyaXB0PT0KLy8gQG5hbWUgICAgICAgICDogZrlkIjmkJzntKLlvJXmk47liIfmjaLlr7zoiKpb5omL5py654mIXVvnp7vliqjnq69dCi8vIEBuYW1lc3BhY2UgICAgaHR0cDovL3RhbXBlcm1vbmtleS5uZXQvCi8vIEB2ZXJzaW9uICAgICAgMjAyMy4xMC4xMgovLyBAZGVzY3JpcHRpb24gIOWcqOaQnOe0oumhtumDqOaYvuekuuS4gOS4quiBmuWQiOaQnOe0ouW8leaTjuWIh+aNouWvvOiIqu+8jOe7vOWQiOaQnOe0ouW8leaTjuOAguS4k+azqOaJi+acuue9kemhteaQnOe0ouW8leaTjuWIh+aNou+8jOe6r+eyueeahOaQnOe0ouOAglNlYXJjaEp1bXBlcuOAgeaQnOe0oui3s+i9rOOAgeiBmuWQiOaQnOe0ouOAgUFsbCBTZWFyY2jjgIFQdW5rIFNlYXJjaOOAgeaQnOe0ouWIh+aNouOAgeaQnOe0oumFseOAggovLyBAYXV0aG9yICAgICAgIFB1bmtKZXQKLy8gQGluY2x1ZGUgICAgICAqCi8vIEBncmFudCAgICAgICAgdW5zYWZlV2luZG93Ci8vIEBncmFudCAgICAgICAgR01fZ2V0VmFsdWUKLy8gQGdyYW50ICAgICAgICBHTV9zZXRWYWx1ZQovLyBAcnVuLWF0ICAgICAgIGRvY3VtZW50LXN0YXJ0Ci8vIEBsaWNlbnNlICAgICBNSVQKLy8gPT0vVXNlclNjcmlwdD09Cgpjb25zdCBwdW5rRGVhZnVsdE1hcmsgPSAiQmluZy1CYWlkdS1Hb29nbGUtVG91dGlhby1Gc291LVF1YXJrLVNvdWdvdS0zNjAiOwpjb25zdCBwdW5rQWxsU2VhcmNoTWFyayA9ICJCaW5nLUJhaWR1LUdvb2dsZS1aaGlodS1Gc291LTM2MC1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