Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@视界|世界@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi6KeG55WMfOS4lueVjCIsImF1dGhvciI6IiIsInVybCI6Imhpa2VyOi8vZW1wdHkjIyNmeUFsbCIsInZlcnNpb24iOjEsImNvbF90eXBlIjoiaWNvbl8yIiwiY2xhc3NfbmFtZSI6IiIsInR5cGUiOiJsaXZlIiwiY2xhc3NfdXJsIjoiIiwiYXJlYV9uYW1lIjoiIiwiYXJlYV91cmwiOiIiLCJzb3J0X25hbWUiOiIiLCJ5ZWFyX25hbWUiOiIiLCJzb3J0X3VybCI6IiIsInllYXJfdXJsIjoiIiwiZmluZF9ydWxlIjoianM6XG52YXIgZGF0YSA9IFtdO1xuZGF0YS5wdXNoKHtcbiAgICB0aXRsZTogXCLwn5SOXCIsXG4gICAgdXJsOiBcIidoaWtlcjovL3NlYXJjaD9ydWxlPVwiICsgTVlfUlVMRS50aXRsZSArIFwiJnM9JytpbnB1dFwiLFxuICAgIGRlc2M6IFwi5pCc57Si6aKR6YGTXCIsXG4gICAgY29sX3R5cGU6IFwiaW5wdXRcIlxufSlcbnZhciBzMiA9ICdodHRwczovL2FwaS5peGlhb3dhaS5jbi9ncWFwaS9ncWFwaS5waHA/Z2xpZGVDYWNoZT1za2lwJyArICcjJyArIG5ldyBEYXRlKCkuZ2V0VGltZSgpO1xuLypmdW5jdGlvbiBnZXRUaXRsZUFuZERlc2MoKSB7XG4gICAgbGV0IGhpdG9rb3RvID1bXTtcbiAgICBsZXQganNvbiA9IEpTT04ucGFyc2UoZmV0Y2goJ2h0dHBzOi8vdjEuaGl0b2tvdG8uY24vP2M9aScsIHt9KSk7XG4gICAgbGV0IHNvdXJjZSA9IGpzb24uZnJvbV93aG87XG4gICAgaWYgKHNvdXJjZSA9PSBudWxsKSBzb3VyY2UgPSAn5pyq55+lJztcbiAgICBoa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ncm91cHNbMF0pO1xuICAgIGlmIChzZWxlY3RHcm91cCA9PSBcIlwiKSBzZWxlY3RHcm91cCA9IGdyb3Vwc1swXTtcbiAgICBncm91cHMuZm9yRWFjaCgoZ3JvdXApID0+IHtcbiAgICAgICAgaWYgKGdyb3VwKSB7XG4gICAgICAgICAgICBkYXRhLnB1c2goe1xuICAgICAgICAgICAgICAgIHRpdGxlOiBncm91cCA9PSBzZWxlY3RHcm91cCA/IFwi4oCc4oCc4oCd4oCdPHNwYW4gc3R5bGU9J2NvbG9yOiAjMTlCODlEJz5cIiArIGdyb3VwICsgXCI8L3NwYW4+XCIgOiBncm91cCxcbiAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGdyb3VwKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdzZWxlY3RHcm91cCcsIGdyb3VwKTtcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xuICAgICAgICAgICAgICAgIH0sIGdyb3VwKSxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICAgICAgICAgIGxpbmVWaXNpYmxlOiBmYWxzZVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICB9KVxuICAgIGZvciAobGV0IHRpdGxlIGluIGl0ZW1zW3NlbGVjdEdyb3VwXSkge1xuICAgICAgICBsZXQgdXMgPSBpdGVtc1tzZWxlY3RHcm91cF1bdGl0bGVdOyAgICAgICAgXG4gICAgICAgIGRhdGEucHVzaCh7XG4gICAgICAgICAgICB0aXRsZTogdGl0bGUuc3BsaXQoXCIjIyNcIilbMF0sXG4gICAgICAgICAgICB1cmw6IHVzLmxlbmd0aCA8IDIgPy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wiO1xcbiAgICAgICAgfVxcbiAgICAgICAgaWYgKGZpbHRlciAhPSBudWxsICYmICF0aXRsZS5pbmNsdWRlcyhmaWx0ZXIpKSB7XFxuICAgICAgICAgICAgY29udGludWVcXG4gICAgICAgIH1cXG4gICAgICAgIGlmIChpdGVtc1tncm91cF0pIHtcXG4gICAgICAgICAgICBpZiAoaXRlbXNbZ3JvdXBdW3RpdGxlXSkge1xcbiAgICAgICAgICAgICAgICBpdGVtc1tncm91cF1bdGl0bGVdID0gaXRlbXNbZ3JvdXBdW3RpdGxlXS5jb25jYXQoW3VybF0pO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGl0ZW1zW2dyb3VwXVt0aXRsZV0gPSBbdXJsXTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIGl0ZW1zW2dyb3VwXSA9IHt9O1xcbiAgICAgICAgICAgIGl0ZW1zW2dyb3VwXVt0aXRsZV0gPSBbdXJsXTtcXG4gICAgICAgIH07XFxuICAgIH1cXG4gICAgcmV0dXJuIGl0ZW1zO1xcbn1cXG4kLmV4cG9ydHMgPSB7XFxuICAgIHJlbmRlckxpdmVEYXRhOiByZW5kZXJMaXZlRGF0YSxcXG59XCJ9XSIsImljb24iOiJodHRwczovL2dpbWcyLmJhaWR1LmNvbS9pbWFnZV9zZWFyY2gvc3JjPWh0dHAlM0ElMkYlMkZjYnUwMS5hbGljZG4uY29tJTJGaW1nJTJGaWJhbmslMkYyMDE5JTJGOTg3JTJGOTI3JTJGMTI3MTQ3Mjk3ODlfMjQ4OTk5NTU1LmpwZyIsInByb3h5IjoiIn0=
Add Comment
Please, Sign In to add comment