Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:网页插件¥js_url¥global_防止未经授权的自动复制@base64://Ly8gPT1Vc2VyU2NyaXB0PT0KLy8gQG5hbWUgICAgICAgICDpmLLmraLmnKrnu4/mjojmnYPnmoToh6rliqjlpI3liLYKLy8gQHZlcnNpb24gICAgICAyMwovLyBAZGVzY3JpcHRpb24gIOWcqOmdnumAieivjeWkjeWItuaXtuaYvuekuuWwj+e6oueCueaPkOekuueUqOaIt+S7pemYsuatouacque7j+aOiOadg+eahOiHquWKqOWkjeWItuOAggovLyBAZ3JhbnQgICAgICAgIEdNX3NldENsaXBib2FyZAovLyBAZ3JhbnQgICAgICAgIEdNX3JlZ2lzdGVyTWVudUNvbW1hbmQKLy8gQGdyYW50ICAgICAgICBHTV9zZXRWYWx1ZQovLyBAZ3JhbnQgICAgICAgIEdNX2dldFZhbHVlCi8vIEBydW4tYXQgICAgICAgZG9jdW1lbnQtc3RhcnQKLy8gQG1hdGNoICAgICAgICAqOi8vKi8qCi8vIEBuYW1lc3BhY2UgICAgaHR0cHM6Ly9ncmVhc3lmb3JrLm9yZy91c2Vycy80NTI5MTEKLy8gQGRvd25sb2FkVVJMIGh0dHBzOi8vdXBkYXRlLmdyZWFzeWZvcmsub3JnL3NjcmlwdHMvNDYxNjI1LyVFOSU5OCVCMiVFNiVBRCVBMiVFNiU5QyVBQSVFNyVCQiU4RiVFNiU4RSU4OCVFNiU5RCU4MyVFNyU5QSU4NCVFOCU4NyVBQSVFNSU4QSVBOCVFNSVBNCU4RCVFNSU4OCVCNi51c2VyLmpzCi8vIEB1cGRhdGVVUkwgaHR0cHM6Ly91cGRhdGUuZ3JlYXN5Zm9yay5vcmcvc2NyaXB0cy80NjE2MjUvJUU5JTk4JUIyJUU2JUFEJUEyJUU2JTlDJUFBJUU3JUJCJThGJUU2JThFJTg4JUU2JTlEJTgzJUU3JTlBJTg0JUU4JTg3JUFBJUU1JThBJUE4JUU1JUE0JTh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