xiaomianao666

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

Jun 30th, 2024
187
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/5ZGKCi8vIEBuYW1lc3BhY2UgICAgICBodHRwczovL2dpdGh1Yi5jb20vc2V4NDA5Ni9oYWlqaWFvX3ZpcAovLyBAdmVyc2lvbiAgICAgICAgMS4wLjgKLy8gQGF1dGhvciAgICAgICAgIGZvcmdldG1lOAovLyBAZGVzY3JpcHRpb24gICAg6Kej6ZSBIOa1t+inkuekvuWMuihoYWlqaWFvLmNvbSkg5pS26LS56KeG6aKRLFZJUCzlubbljrvpmaTnvZHnq5nlub/lkYosIFRH6aKR6YGTOkBzdmlwX25hdi7mnKzmj5Lku7blrozlhajlhY3otLks6K+35rOo5oSP55SE5YirLOmBv+WFjeS4iuW9k+WPl+mqly4KLy8gQGhvbWVwYWdlICAgICAgIGh0dHBzOi8vZ2l0aHViLmNvbS9zZXg0MDk2L2hhaWppYW9fdmlwI3JlYWRtZQovLyBAc3VwcG9ydFVSTCAgICAgaHR0cHM6Ly9naXRodWIuY29tL3NleDQwOTYvaGFpamlhb192aXAvaXNzdWUKLy8gQHJ1bi1hdCAgICAgICAgIGRvY3VtZW50LWlkbGUKLy8gQG1hdGNoICAgICAgICAgIGh0dHBzOi8vd3d3LmhqY3gub3JnLyoKLy8gQG1hdGNoICAgICAgICAgIGh0dHBzOi8vaGpjeC5vcmcvKgovLyBAbWF0Y2ggICAgICAgICAgaHR0cHM6Ly93d3cuaGFpamlhby5jb20vKgovLyBAbWF0Y2ggICAgICAgICAgaHR0cHM6Ly9oYWlqaWFvLmNvbS8qCi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lbmNfZGF0YS5sZW5ndGggPiAwKSB7CiAgICAgICAgICBjb25zdCBCYXNlNjQgPSBnZXRNb2R1bGUoImU3NjIiKS5hOwogICAgICAgICAgZW5jX2RhdGEgPSBKU09OLnBhcnNlKEJhc2U2NC5kZWNvZGUoQmFzZTY0LmRlY29kZShCYXNlNjQuZGVjb2RlKGVuY19kYXRhKSkpKTsKICAgICAgICB9CiAgICAgICAgcmVzcG9uc2UgPSB7CiAgICAgICAgICBpdGVtOiBlbmNfZGF0YSwKICAgICAgICAgIHVybDogcmVzcG9uc2UuY29uZmlnLnVybCwKICAgICAgICAgIG1vYmlsZTogdHJ1ZSwKICAgICAgICAgIG9yaWdpbl9yZXNwb25zZTogb3JpZ2luX3Jlc3BvbnNlCiAgICAgICAgfTsKICAgICAgfSBlbHNlIHsKICAgICAgICAvLyDlhYvpmobkuIDkuKrljp/lp4vor7fmsYIKICAgICAgICBjb25zdCBvcmlnaW5fcmVzcG9uc2UgPSBKU09OLnBhcnNlKEpTT04uc3RyaW5naWZ5KHJlc3BvbnNlLmRhdGEpKTsKICAgICAgICBjb25zdCBpdGVtID0gSlNPTi5wYXJzZShKU09OLnN0cmluZ2lmeShyZXNwb25zZS5kYXRhLmRhdGEpKTsKICAgICAgICByZXNwb25zZSA9IHsKICAgICAgICAgIGl0ZW06IGl0ZW0sCiAgICAgICAgICB1cmw6IHJlc3BvbnNlLmNvbmZpZy51cmwsCiAgICAgICAgICBtb2JpbGU6IGZhbHNlLAogICAgICAgICAgb3JpZ2luX3Jlc3BvbnNlOiBvcmlnaW5fcmVzcG9uc2UKICAgICAgICB9OwogICAgICB9CiAgICAgIHJldHVybiByZXNwb25zZTsKICAgIH0KCiAgICAvKioKICAgICAqIOWvuXJlcG9uc2Xph43mlrDnvJbnoIEKICAgICAqIEBwYXJhbSByZXNwb25zZQogICAgICogQHJldHVybnMKICAgICAqLwogICAgYXN5bmMgcmVzcG9uc2VFbmNvZGVJbnRlcmNlcHRvcihyZXNwb25zZSkgewogICAgICBpZiAocmVzcG9uc2UubW9iaWxlID09PSB0cnVlKSB7CiAgICAgICAgdmFyIGRlYyA9IHJlc3BvbnNlLml0ZW07CiAgICAgICAgaWYgKHJlc3BvbnNlLm9yaWdpbl9yZXNwb25zZS5pc0VuY3J5cHRlZCA9PT0gdHJ1ZSkgewogICAgICAgICAgY29uc3QgQmFzZTY0ID0gZ2V0TW9kdWxlKCJlNzYyIikuYTsKICAgICAgICAgIGRlYyA9IEJhc2U2NC5lbmNvZGUoQmFzZTY0LmVuY29kZShCYXNlNjQuZW5jb2RlKEpTT04uc3RyaW5naWZ5KHJlc3BvbnNlLml0ZW0pKSkpOwogICAgICAgIH0KICAgICAgICByZXR1cm4gewogICAgICAgICAgZGF0YTogewogICAgICAgICAgICAuLi5yZXNwb25zZS5vcmlnaW5fcmVzcG9uc2UsCiAgICAgICAgICAgIGRhdGE6IGRlYwogICAgICAgICAgfQogICAgICAgIH07CiAgICAgIH0gZWxzZSB7CiAgICAgICAgcmV0dXJuIHsKICAgICAgICAgIC4uLnJlc3BvbnNlLm9yaWdpbl9yZXNwb25zZSwKICAgICAgICAgIGRhdGE6IHJlc3BvbnNlLml0ZW0KICAgICAgICB9OwogICAgICB9CiAgICB9CiAgICBhc3luYyByZXNwb25zZUludGVyY2VwdG9yKHJlc3BvbnNlKSB7CiAgICAgIGNvbnN0IHVybCA9IHJlc3BvbnNlLnVybC50b0xvd2VyQ2FzZSgpOwogICAgICB2YXIgaXRlbSA9IHJlc3BvbnNlLml0ZW07CiAgICAgIGNvbnNvbGUubG9nKCLmi6bmiKrlmajov5Tlm57mlbDmja4iLCB1cmwsIGl0ZW0pOwogICAgICBpZiAoL15cL2FwaVwvdG9waWNcL1xkKy9nLnRlc3QodXJsKSAmJiBQbHVnaW5TdG9yZS5nZXQoInVubG9ja1ZpcCIsIHRydWUpID09PSB0cnVlKSB7CiAgICAgICAgaXRlbSA9IGF3YWl0IHRoaXMuZml4VG9waWMoaXRlbSk7CiAgICAgIH0KIC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jb250ZW50LnJlcGxhY2UoL1xb5Zu+54mHXF0vZywgIiIpOwogICAgICAgIGNvbnRlbnQgPSBjb250ZW50LnJlcGxhY2UoL+atpOWkhOWGheWuueWUruS7t1xkK+mHkeW4gS4q6K+36LSt5Lmw5ZCO5p+l55yLLi9nLCAiIik7CiAgICAgICAgY29udGVudCA9IGNvbnRlbnQucmVwbGFjZSgvXFtzZWxsLipcL3NlbGxdL2csICIiKTsKICAgICAgICBkYXRhLmF0dGFjaG1lbnRzPy5mb3JFYWNoKGF0dGFjaG1lbnQgPT4gewogICAgICAgICAgdmFyIGhhc0ltYWdlLAogICAgICAgICAgICBoYXNWaWRlbyA9IGZhbHNlOwogICAgICAgICAgLy8g5aSE55CG5Zu+54mHCiAgICAgICAgICBpZiAoYXR0YWNobWVudC5jYXRlZ29yeSA9PT0gImltYWdlcyIgJiYgYXR0YWNobWVudC5yZW1vdGVVcmwpIHsKICAgICAgICAgICAgY29udGVudCA9IGNvbnRlbnQgKz0gYDxwPjxpbWcgc3JjPSIke2F0dGFjaG1lbnQucmVtb3RlVXJsfSIgZGF0YS1pZD0iJHthdHRhY2htZW50LmlkfSIvPmA7CiAgICAgICAgICAgIGhhc0ltYWdlID0gdHJ1ZTsKICAgICAgICAgIH0KICAgICAgICAgIGlmIChoYXNJbWFnZSA9PT0gdHJ1ZSkgewogICAgICAgICAgICBjb250ZW50ID0gYDxwPiR7Y29udGVudH08L3A+YDsKICAgICAgICAgIH0KICAgICAgICAgIGlmIChhdHRhY2htZW50LmNhdGVnb3J5ID09PSAidmlkZW8iKSB7CiAgICAgICAgICAgIC8vIGlmIChhdHRhY2htZW50LnJlbW90ZVVybCkgewogICAgICAgICAgICBoYXNWaWRlbyA9IHRydWU7CiAgICAgICAgICAgIGNvbnRlbnQgKz0gYDxwPjx2aWRlbyBzcmM9IiR7YXR0YWNobWVudC5yZW1vdGVVcmx9IiBkYXRhLWlkPSIke2F0dGFjaG1lbnQuaWR9Ij48L3ZpZGVvPjwvcD5gOwogICAgICAgICAgICAvLyB9IGVsc2UgewogICAgICAgICAgICAvLyAgIGNvbnNvbGUubG9nKCLop4bpopHpk77mjqXkuLrnqboiLCBhdHRhY2htZW50KTsKICAgICAgICAgICAgLy8gICBjb250ZW50ICs9IGA8cD48ZGl2IHN0eWxlPSJjb2xvcjpyZWQ7dGV4dC1kZWNvcmF0aW9uOmxpbmUtdGhyb3VnaDsiPiR7YXR0YWNobWVudC5lcnJvcn08L2Rpdj48L3A+YDsKICAgICAgICAgICAgLy8gfQogICAgICAgICAgfQogICAgICAgICAgaWYgKGhhc1ZpZGVvID09PSB0cnVlKSB7CiAgICAgICAgICAgIGNvbnRlbnQgPSBgPHA+JHtjb250ZW50fTwvcD5gOwogICAgICAgICAgfQogICAgICAgIH0pOwogICAgICAgIGNvbnRlbnQgPSBgPGh0bWw+PGhlYWQ+PC9oZWFkPjxib2R5PiR7Y29udGVudH08L2JvZHk+PC9odG1sPmA7CiAgICAgIH0KICAgICAgZGF0YS5jb250ZW50ID0gY29udGVudDsKICAgICAgcmV0dXJuIGRhdGE7CiAgICB9CgogICAgLyoqCiAgICAgKiDljrvlub/lkYoKICAgICAqIEBwYXJhbSBkYXRhCiAgICAgKi8KICAgIGFzeW5jIGZpeEFkcyhkYXRhKSB7CiAgICAgIHJldHVybiBudWxsOwogICAgfQogICAgYXN5bmMgZml4VG9wcyhkYXRhKSB7CiAgICAgIHJldHVybiBbXTsKICAgIH0KICB9CgogIGZ1bmN0aW9uIGFkZFN0eWxlKCkgewogICAgbGV0IHNjcmlwdCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoImxpbmsiKTsKICAgIHNjcmlwdC5zZXRBdHRyaWJ1dGUoInJlbCIsICJzdHlsZXNoZWV0Iik7CiAgICBzY3JpcHQuc2V0QXR0cmlidXRlKCJ0eXBlIiwgInRleHQvY3NzIik7CiAgICBzY3JpcHQuaHJlZiA9ICJodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvbnBtL2FudGRANS4x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