xiaomianao666

小程序:视界|世界

Aug 1st, 2023
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@视界|世界@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi6KeG55WMfOS4lueVjCIsImF1dGhvciI6IiIsInVybCI6Imhpa2VyOi8vZW1wdHkjIyNmeUFsbCIsInZlcnNpb24iOjQsImNvbF90eXBlIjoiaWNvbl8yIiwiY2xhc3NfbmFtZSI6IiIsInR5cGUiOiJsaXZlIiwiY2xhc3NfdXJsIjoiIiwiYXJlYV9uYW1lIjoiIiwiYXJlYV91cmwiOiIiLCJzb3J0X25hbWUiOiIiLCJ5ZWFyX25hbWUiOiIiLCJzb3J0X3VybCI6IiIsInllYXJfdXJsIjoiIiwiZmluZF9ydWxlIjoianM6XG52YXIgZGF0YSA9IFtdO1xuZGF0YS5wdXNoKHtcbiAgICB0aXRsZTogXCLwn5SOXCIsXG4gICAgdXJsOiBcIidoaWtlcjovL3NlYXJjaD9ydWxlPVwiICsgTVlfUlVMRS50aXRsZSArIFwiJnM9JytpbnB1dFwiLFxuICAgIGRlc2M6IFwi5pCc57Si6aKR6YGTXCIsXG4gICAgY29sX3R5cGU6IFwiaW5wdXRcIlxufSlcbnZhciBzMiA9ICdodHRwczovL2FwaS5peGlhb3dhaS5jbi9ncWFwaS9ncWFwaS5waHA/Z2xpZGVDYWNoZT1za2lwJyArICcjJyArIG5ldyBEYXRlKCkuZ2V0VGltZSgpO1xuLypmdW5jdGlvbiBnZXRUaXRsZUFuZERlc2MoKSB7XG4gICAgbGV0IGhpdG9rb3RvID1bXTtcbiAgICBsZXQganNvbiA9IEpTT04ucGFyc2UoZmV0Y2goJ2h0dHBzOi8vdjEuaGl0b2tvdG8uY24vP2M9aScsIHt9KSk7XG4gICAgbGV0IHNvdXJjZSA9IGpzb24uZnJvbV93aG87XG4gICAgaWYgKHNvdXJjZSA9PSBudW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ICdzY3JvbGxfYnV0dG9uJyxcbiAgICAgICAgICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgICAgICAgICBsaW5lVmlzaWJsZTogZmFsc2VcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KVxuICAgICAgICB9XG4gICAgfSlcbiAgICBmb3IgKGxldCB0aXRsZSBpbiBpdGVtc1tzZWxlY3RHcm91cF0pIHtcbiAgICAgICAgbGV0IHVzID0gaXRlbXNbc2VsZWN0R3JvdXBdW3RpdGxlXTsgICAgICAgIFxuICAgICAgICBkYXRhLnB1c2goe1xuICAgICAgICAgICAgdGl0bGU6IHRpdGxlLnNwbGl0KFwiIyMjXCIpWzBdLFxuICAgICAgICAgICAgdXJsOiB1cy5sZW5ndGggPCAyID8gdXNbMF06IEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgICAgICAgICB1cmxzOiB1c1xuICAgICAgICAgICAgfSksXG4vL2NvbF90eXBlOiAnaWNvbl8yX3JvdW5kJyxcbiAgICAgICAgICAgIGltZzogXCJcIlxuICAgICAgICB9KVxuICAgIH1cbn1cbiAgICAgICAgICBjYXRjaCAoZSkge1xuICAgIGRhdGEucHVzaCh7XG4gICAgICAgIHRpdGxlOiBcIuaVsOaNruWKoOi9veWksei0pVwiLFxuICAgICAgICBkZXNjOiBKU09OLnN0cmluZ2lmeShlKSxcbiAgICAgICAgY29sX3R5cGU6IFwidGV4dF8xXCJcbiAgICB9KVxufVxuIGZvciAobGV0IGl0IG9mIGRhdGEpIHtcbiAgICBpZiAoIWl0LmNvbF90eXBlICYmIGl0LnVybCAmJiAhaXQudXJsLnN0YXJ0c1dpdGgoXCJ7XCIpKSB7XG4gICAgICAgIGl0LnVybCA9IGxhenlSdWxlKGl0LnVybCk7XG4gICAgfVxuICAgIGlmICghaXQuY29sX3R5cGUgJiYgaXQudXJsKSB7XG4gICAgICAgIGl0LmltZyA9IFwiaHR0cHM6Ly9naW1nMi5iYWlkdS5jb20vaW1hZ2Vfc2Vhcm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gICAgICAgY29udGludWU7XFxuICAgICAgICB9XFxuICAgICAgICBsZXQgdGl0bGUgPSBpWzJdLFxcbiAgICAgICAgICAgIHVybCA9IGlbM10udHJpbSgpO1xcbiAgICAgICAgaWYgKHVybC5pbmRleE9mKFxcXCIucGhwXFxcIikgPiAwIHx8IHVybC5pbmNsdWRlcyhcXFwiQGxhenlSdWxlXFxcIikgfHwgdXJsLmluY2x1ZGVzKFxcXCI7XFxcIikpIHtcXG4gICAgICAgICAgICB0aXRsZSA9IHRpdGxlICsgXFxcIiMjI1xcXCIgKyBuZXcgRGF0ZSgpLmdldFRpbWUoKSArIG1kNSh1cmwpO1xcbiAgICAgICAgICAgIC8vbG9nKGopO1xcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAvL3VybCA9IHVybCArIFxcXCIjaXNWaWRlbz10cnVlI1xcXCI7XFxuICAgICAgICB9XFxuICAgICAgICBpZiAoZmlsdGVyICE9IG51bGwgJiYgIXRpdGxlLmluY2x1ZGVzKGZpbHRlcikpIHtcXG4gICAgICAgICAgICBjb250aW51ZVxcbiAgICAgICAgfVxcbiAgICAgICAgaWYgKGl0ZW1zW2dyb3VwXSkge1xcbiAgICAgICAgICAgIGlmIChpdGVtc1tncm91cF1bdGl0bGVdKSB7XFxuICAgICAgICAgICAgICAgIGl0ZW1zW2dyb3VwXVt0aXRsZV0gPSBpdGVtc1tncm91cF1bdGl0bGVdLmNvbmNhdChbdXJsXSk7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgaXRlbXNbZ3JvdXBdW3RpdGxlXSA9IFt1cmxdO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgaXRlbXNbZ3JvdXBdID0ge307XFxuICAgICAgICAgICAgaXRlbXNbZ3JvdXBdW3RpdGxlXSA9IFt1cmxdO1xcbiAgICAgICAgfTtcXG4gICAgfVxcbiAgICByZXR1cm4gaXRlbXM7XFxufVxcbiQuZXhwb3J0cyA9IHtcXG4gICAgcmVuZGVyTGl2ZURhdGE6IHJlbmRlckxpdmVEYXRhLFxcbn1cIn1dIiwiaWNvbiI6Imh0dHBzOi8vZ2ltZzIuYmFpZHUuY29tL2ltYWdlX3NlYXJjaC9zcmM9aHR0cCUzQSUyRiUyRmNidTAxLmFsaWNkbi5jb20lMkZpbWclMkZpYmFuayUyRjIwMTklMkY5ODclMkY5MjclMkYxMjcxNDcyOTc4OV8yNDg5OTk1NTUuanBnIiwicHJveHkiOiIifQ==
Add Comment
Please, Sign In to add comment