xiaomianao666

插件名:global_haijiao-vip:海角社区解锁收费视频,VIP,去广告

Jul 1st, 2024
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:网页插件¥js_url¥global_haijiao-vip:海角社区解锁收费视频,VIP,去广告@base64://Ci8vID09VXNlclNjcmlwdD09Ci8vIEBuYW1lICAgICAgICAgICBoYWlqaWFvLXZpcDog5rW36KeS56S+5Yy6IOino+mUgeaUtui0ueinhumikSxWSVAs5Y675bm/5ZGKCi8vIEBuYW1lc3BhY2UgICAgICBodHRwczovL2dpdGh1Yi5jb20vc2V4NDA5Ni9oYWlqaWFvX3ZpcAovLyBAdmVyc2lvbiAgICAgICAgMS4wLjYKLy8gQGF1dGhvciAgICAgICAgIGZvcmdldG1lOAovLyBAZGVzY3JpcHRpb24gICAg6Kej6ZSBIOa1t+inkuekvuWMuihoYWlqaWFvLmNvbSkg5pS26LS56KeG6aKRLFZJUCzlubbljrvpmaTnvZHnq5nlub/lkYosIFRH6aKR6YGTOkBzdmlwX25hdi7mnKzmj5Lku7blrozlhajlhY3otLks6K+35rOo5oSP55SE5YirLOmBv+WFjeS4iuW9k+WPl+mqly4KLy8gQGhvbWVwYWdlICAgICAgIGh0dHBzOi8vZ2l0aHViLmNvbS9zZXg0MDk2L2hhaWppYW9fdmlwI3JlYWRtZQovLyBAc3VwcG9ydFVSTCAgICAgaHR0cHM6Ly9naXRodWIuY29tL3NleDQwOTYvaGFpamlhb192aXAvaXNzdWUKLy8gQHJ1bi1hdCAgICAgICAgIGRvY3VtZW50LWlkbGUKLy8gQG1hdGNoICAgICAgICAgIGh0dHBzOi8vd3d3LmhhaWppYW8uY29tLyoKLy8gQG1hdGNoICAgICAgICAgIGh0dHBzOi8vaGFpamlhby5jb20vKgovLyBAbWF0Y2ggICAgICAgICAgaHR0cHM6Ly8qLnRvcC9ob21lCi8vIEBtYXRjaCAgICAgICAgICAqL3Bvc3QvZGV0YWlscz9waWQ9KgovLyBAb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jvc3NEb21haW4gPSB0cnVlOwogICAgICAgIH0KICAgICAgfQogICAgICByZXR1cm4gcmVxdWVzdDsKICAgIH0KCiAgICAvKioKICAgICAqIOafpeeci+iiq2JhbueahOeUqOaIt+S/oeaBrwogICAgICogQHBhcmFtIHJlcXVlc3QKICAgICAqLwogICAgYXN5bmMgcmVxdWVzdFVubG9ja0JhblVzZXJJbnRlcmNlcHRvcihyZXF1ZXN0KSB7CiAgICAgIGlmIChQbHVnaW5TdG9yZS5nZXQoInVubG9ja0JhblVzZXIiLCB0cnVlKSA9PT0gdHJ1ZSAmJiBQbHVnaW5TdG9yZS5nZXQoImhvc3QiLCAiIikubGVuZ3RoID4gMCkgewogICAgICAgIGlmICgvXC9hcGlcL3VzZXJcL2luZm9cL1xkKy9nLnRlc3QocmVxdWVzdC51cmwpIHx8IC9cL2FwaVwvdXNlclwvbmV3c1wvb3RoZXJfbmV3c19saXN0L2cudGVzdChyZXF1ZXN0LnVybCkgfHwgL1wvYXBpXC90b3BpY1wvbm9kZVwvdG9waWNzL2cudGVzdChyZXF1ZXN0LnVybCkgJiYgcmVxdWVzdC51cmwuaW5jbHVkZXMoInVzZXJJZCIpKSB7CiAgICAgICAgICBjb25zb2xlLmxvZygi5p+l55yL6KKrYmFu55qE55So5oi35L+h5oGvIiwgcmVxdWVzdC51cmwpOwogICAgICAgICAgdmFyIGhvc3QgPSBQbHVnaW5TdG9yZS5nZXQoImhvc3QiLCAiIik7CiAgICAgICAgICByZXF1ZXN0LmJhc2VVUkwgPSBob3N0OwogICAgICAgICAgcmVxdWVzdC5jcm9zc0RvbWFpbiA9IHRydWU7CiAgICAgICAgfQogICAgICB9CiAgICAgIHJldHVybiByZXF1ZXN0OwogICAgfQoKICAgIC8qKgogICAgICog6Kej6ZSB5pCc57Si5Yqf6IO9CiAgICAgKiBAcGFyYW0gcmVxdWVzdAogICAgICovCiAgICBhc3luYyByZXF1ZXN0U2VhcmNoSW50ZXJjZXB0b3IocmVxdWVzdCkgewogICAg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09PSB0cnVlKSB7CiAgICAgICAgaXRlbSA9IGF3YWl0IHRoaXMuZml4QWRzKGl0ZW0pOwogICAgICB9CiAgICAgIC8vIOWxj+iUvee9rumhtuW4lgogICAgICBlbHNlIGlmICgvXlwvYXBpXC90b3BpY1wvZ2xvYmFsXC90b3BpY3MvZy50ZXN0KHVybCkgJiYgUGx1Z2luU3RvcmUuZ2V0KCJyZW1vdmVUb3BzIiwgdHJ1ZSkgPT09IHRydWUpIHsKICAgICAgICBpdGVtID0gYXdhaXQgdGhpcy5maXhUb3BzKGl0ZW0pOwogICAgICB9CiAgICAgIHJlc3BvbnNlLml0ZW0gPSBpdGVtOwogICAgICByZXR1cm4gcmVzcG9uc2U7CiAgICB9CiAgICAvKioKICAgICAqIOS/ruWkjeW4luWtkOWGheWuuQogICAgICogQHBhcmFtIHsqfSBkYXRhCiAgICAgKiBAcmV0dXJucwogICAgICovCiAgICBhc3luYyBmaXhUb3BpYyhkYXRhKSB7CiAgICAgIGNvbnNvbGUubG9nKCLkv67lpI3luJblrZDlhoXlrrkiLCBkYXRhKTsKICAgICAgaWYgKGRhdGEubm9kZT8udmlwTGltaXQgPiAwKSB7CiAgICAgICAgZGF0YS5ub2RlLnZpcExpbWl0ID0gMDsKICAgICAgfQogICAgICB2YXIgY29udGVudCA9IGRhdGEuY29udGVudDsKICAgICAgaWYgKGNvbnRlbnQgJiYgIWNvbnRlbnQuc3RhcnRzV2l0aCgiPGh0bWw+PGhlYWQ+PC9oZWFkPjxib2R5PiIpKSB7CiAgICAgICAgLy8g5Yig6Zmk5o6JW13moIfnrb4KICAgICAgICBjb250ZW50ID0gY29udGVudC5yZXBsYWNlKC9cW+inhumikVxdL2csICIiKTsKICAgICAgICBjb250ZW50ID0gY29udGVudC5yZXBsYWNlKC9cW+WbvueJh1xdL2csICIiKTsKICAgICAgICBjb250ZW50ID0gY29udGVudC5yZXBsYWNlKC/mraTlpITlhoXlrrnllK7ku7dcZCvph5HluIEuKuivt+i0reS5sOWQjuafpeeciy4vZywgIiIpOwogICAgICAgIGNvbnRlbnQgPSBjb250ZW50LnJlcGxhY2UoL1xbc2VsbC4qXC9zZWxsXS9nLCAiIik7CiAgICAgICAgZGF0YS5hdHRhY2htZW50cz8uZm9yRWFjaChhdHRhY2htZW50ID0+IHsKICAgICAgICAgIHZhciBoYXNJbWFnZSwKICAgICAgICAgICAgaGFzVmlkZW8gPSBmYWxzZTsKICAgICAgICAgIC8vIOWkhOeQhuWbvueJhwogICAgICAgICAgaWYgKGF0dGFjaG1lbnQuY2F0ZWdvcnkgPT09ICJpbWFnZXMiICYmIGF0dGFjaG1lbnQucmVtb3RlVXJsKSB7CiAgICAgICAgICAgIGNvbnRlbnQgPSBjb250ZW50ICs9IGA8cD48aW1nIHNyYz0iJHthdHRhY2htZW50LnJlbW90ZVVybH0iIGRhdGEtaWQ9IiR7YXR0YWNobWVudC5pZH0iLz5gOwogICAgICAgICAgICBoYXNJbWFnZSA9IHRydWU7CiAgICAgICAgICB9CiAgICAgICAgICBpZiAoaGFzSW1hZ2UgPT09IHRydWUpIHsKICAgICAgICAgICAgY29udGVudCA9IGA8cD4ke2NvbnRlbnR9PC9wPmA7CiAgICAgICAgICB9CiAgICAgICAgICBpZiAoYXR0YWNobWVudC5jYXRlZ29yeSA9PT0gInZpZGVvIikgewogICAgICAgICAgICAvLyBpZiAoYXR0YWNobWVudC5yZW1vdGVVcmwpIHsKICAgICAgICAgICAgaGFzVmlkZW8gPSB0cnVlOwogICAgICAgICAgICBjb250ZW50ICs9IGA8cD48dmlkZW8gc3JjPSIke2F0dGFjaG1lbnQucmVtb3RlVXJsfSIgZGF0YS1pZD0iJHthdHRhY2htZW50LmlkfSI+PC92aWRlbz48L3A+YDsKICAgICAgICAgICAgLy8gfSBlbHNlIHsKICAgICAgICAgICAgLy8gICBjb25zb2xlLmxvZygi6KeG6aKR6ZO+5o6l5Li656m6IiwgYXR0YWNobWVudCk7CiAgICAgICAgICAgIC8vICAgY29udGVudCArPSBgPHA+PGR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