xiaomianao666

小程序:豆瓣新版.D

Apr 24th, 2023
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@豆瓣新版.D@eyJmaXJzdEhlYWRlciI6ImNsYXNzIiwidGl0bGUiOiLosYbnk6PmlrDniYguRCIsImF1dGhvciI6Iihvy5jil6HLmG8pJlJlYm9ybiIsInVybCI6Imh0dHBzOi8vbW92aWUuZG91YmFuLmNvbS9qL25ld19zZWFyY2hfc3ViamVjdHM/cmFuZ2U9MCwxMCZzdGFydD1meXBhZ2VALTFAKjIwQCZ0YWdzPWZ5Y2xhc3MmZnlzb3J0JmZ5YXJlYSZmeXllYXIiLCJ2ZXJzaW9uIjoxMCwiY29sX3R5cGUiOiJtb3ZpZV8zIiwiY2xhc3NfbmFtZSI6IuWFqOmDqCbnlLXlvbEm55S16KeG5YmnJue7vOiJuibliqjmvKsm57qq5b2V54mHJuefreeJhyIsImNsYXNzX3VybCI6IibnlLXlvbEm55S16KeG5YmnJue7vOiJuibliqjmvKsm57qq5b2V54mHJuefreeJhyIsImFyZWFfbmFtZSI6IuWFqOmDqCbkuK3lm73lpKfpmYYm576O5Zu9JuS4reWbvemmmea4rybkuK3lm73lj7Dmub4m5pel5pysJumfqeWbvSboi7Hlm70m5rOV5Zu9JuW+t+WbvSbmhI/lpKfliKkm6KW/54+t54mZJuWNsOW6pibms7Dlm70m5L+E572X5pavJuS8iuaclybliqDmi7/lpKcm5r6z5aSn5Yip5LqaJueIseWwlOWFsCbnkZ7lhbgm5be06KW/JuS4uem6piIsImFyZWFfdXJsIjoiY291bnRyaWVzPSZjb3VudHJpZXM95Lit5Zu95aSn6ZmGJmNvdW50cmllcz3nvo7lm70mY291bnRyaWVzPeS4reWbvemmmea4ryZjb3VudHJpZXM95Lit5Zu95Y+w5rm+JmNvdW50cmllcz3ml6XmnKwmY291bnRyaWVzPemfqeWbvSZjb3VudHJpZXM96Iux5Zu9JmNvdW50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hOWIhlxuICovXG50cnkge1xuICAgIGxldCByYXRpbmcgPSBwYXJzZURvbUZvckh0bWwoaHRtbCwgJyNpbnRlcmVzdF9zZWN0bCYmSHRtbCcpO1xuICAgIGxldCByYXRpbmdfdGl0bGUgPSAnJztcbiAgICBsZXQgcmF0aW5nX2NvbnRlbnQgPSAnJztcbiAgICBsZXQgcmF0aW5nX3Nob3cgPSBwYXJzZURvbUZvckh0bWwocmF0aW5nLCAnLnJhdGluZ19zZWxmJiZkaXZbY2xhc3NePXJhdGluZ19yaWdodF0mJlRleHQnKTtcbiAgICBpZiAocmF0aW5nX3Nob3cgPT09ICflsJrmnKrmkq3lh7onIHx8IHJhdGluZ19zaG93ID09PSAn5bCa5pyq5LiK5pigJykge1xuICAgICAgICByYXRpbmdfY29udGVudCArPSAoZ2V0QmlnVGV4dCgn6LGG55Oj6K+E5YiGJykgKyAnICcgKyBnZXRTbWFsbFRleHQoZ2V0R3JleVRleHQocmF0aW5nX3Nob3cpKSk7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgbGV0IHJhdGluZ1RleHQgPSBwYXJzZURvbUZvckh0bWwocmF0aW5nLCAnLnJhdGluZ19zZWxmJiZzdHJvbmcmJlRleHQnKTtcbiAgICAgICAgcmF0aW5nX2NvbnRlbnQgKz0gZ2V0QmlnVGV4dCgn6LGG55Oj6K+E5YiGICdcbiAgICAgICAgICAgICsgKHJhdGluZ1RleHQgPT09ICcnXG4gICAgICAgICAgICAgICAgPyBnZXRTbWFsbFRleHQoZ2V0R3JleVRleHQoJ+aaguaXoOivhOWIhicpKVxuICAgICAgICAgICAgICAgIDogKGdldFRpdGxlVGV4dChyYXRpbmdUZXh0KSArICcg5YiGJykpXG4gICAgICAgICAgICArICc8YnI+Jyk7XG4gICAgICAgIGxldCByYXRpbmdfYXJyYXkgPSBbXTtcbiAgICAgICAgaWYgKG1VcmwuaW5kZXhPZignYm9vaycpID4gLTEpIHtcbiAgICAgICAgICAgIHJhdGluZ19hcnJheSA9IHJhdGluZy5tYXRjaCgvPHNwYW4gY2xhc3M9XCJzdGFyc1tcXHNcXFNdKj8oPz08YnI+KS9nKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJhdGluZ19hcnJheSA9IHBhcnNlRG9tRm9yQXJyYXkocmF0aW5nLCAnLnJhdGluZ3Mtb24td2VpZ2h0JiYuaXRlbScpO1xuICAgICAgICB9XG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgcmF0aW5nX2FycmF5Lmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICBsZXQgcmF0aW5nSXRlbSA9IHJhdGluZ19hcnJheVtpXTtcbiAgICAgICAgICAgIGlmIChpID09PSAwKSByYXRpbmdfY29udGVudCArPSAn8J+MnyAnO1xuICAgICAgICAgICAgaWYgKGkgPT09IDIpIHJhdGluZ19jb250ZW50ICs9ICc8YnI+4q2QICc7XG4gICAgICAgICAgICBpZiAoaSA9PT0gMykgcmF0aW5nX2NvbnRlbnQgKz0gJzxicj7imITvuI8gJztcbiAgICAgICAgICAgIHJhdGluZ19jb250ZW50ICs9IGdldENvbG9yVGV4dChwYXJzZURvbUZvckh0bWwocmF0aW5nSXRlbSwgJ1RleHQnKSwgcmF0aW5nQ29sb3JzW2ldKSArICdcXHRcXHQnO1xuICAgICAgICB9XG4gICAgfVxuICAgIGxldCBkQ29udGVudCA9IHJhdGluZ190aXRsZSArIChyYXRpbmdfdGl0bGUgPT09ICcnID8gJycgOiAnPGJyPicpICsgcmF0aW5nX2NvbnRlbnQ7XG4gICAgZC5wdXNoKHtcbiAgICAgICAgdGl0bGU6IGRDb250ZW50XG4gICAgfSk7XG4gICAgZm9yIChsZXQgaSA9IDA7IGkgPCBsaW5lX21vZGVsOyBpKyspIHtcbiAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgIGNvbF90eXBlOiBsaW5lX3R5cGVfbW9kZWxcbiAgICAgICAgfSlcbiAgICB9XG59IGNhdGNoIChlKSB7IH1cblxuLyoqX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eSB7XG4gICAgICAgICAgICByYXRpbmdUZXh0ID0gJ1xcdCcgKyBnZXRSYXRpbmdUZXh0KHBhcnNlRG9tRm9ySHRtbChjb21tZW50SHRtbEl0ZW0sICcuY29tbWVudC1pbmZvJiYucmF0aW5nJiZ0aXRsZScpKVxuICAgICAgICB9IGNhdGNoIChlKSB7IH1cbiAgICAgICAgbGV0IG1ldGEgPSBnZXRBdXRob3JUZXh0KHBhcnNlRG9tRm9ySHRtbChjb21tZW50SHRtbEl0ZW0sICcuY29tbWVudC1pbmZvJiZhJiZUZXh0JykpXG4gICAgICAgICAgICArICdcXHQnXG4gICAgICAgICAgICArIGdldEdyZXlUZXh0KHdhdGNoU3RhdHVzKVxuICAgICAgICAgICAgKyByYXRpbmdUZXh0XG4gICAgICAgICAgICArICdcXHQnXG4gICAgICAgICAgICArIGdldEdyZXlUZXh0KHBhcnNlRG9tRm9ySHRtbChjb21tZW50SHRtbEl0ZW0sICcuY29tbWVudC1pbmZvJiZzcGFuW2NsYXNzXj1jb21tZW50LXRpbWVdJiZUZXh0JykpO1xuICAgICAgICBkQ29udGVudCA9IGNvbnRlbnQgKyAnPGJyPicgKyBnZXRDb21tZW50TWV0YShtZXRhKTtcbiAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgIHRpdGxlOiBkQ29udGVudFxuICAgICAgICAgICAgICAgIC5yZXBsYWNlKC88YSBjbGFzcz1cInNvdXJjZS1pY29uXCJbXFxzXFxTXSo/PFxcL2E+L2csICcnKVxuICAgICAgICAgICAgICAgIC5yZXBsYWNlKC9cXCg8YSBocmVmPVwiamF2YXNjcmlwdDo7XCJbXFxzXFxTXSo/PuWxleW8gDxcXC9hPlxcKS9nLCAnJylcbiAgICAgICAgfSk7XG4gICAgICAgIGlmIChpIDwgY29tbWVudHNfY29udGVudF9odG1sX2FycmF5Lmxlbmd0aCAtIDEpIHtcbiAgICAgICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5l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m9ySHRtbChyZXZpZXdIdG1sSXRlbSwgJy5tYWluLWhkJiYubWFpbi10aXRsZS1yYXRpbmcmJnRpdGxlJykpXG4gICAgICAgIH0gY2F0Y2ggKGUpIHsgfVxuICAgICAgICBsZXQgbWV0YSA9IGdldEF1dGhvclRleHQocGFyc2VEb21Gb3JIdG1sKHJldmlld0h0bWxJdGVtLCAnLm1haW4taGQmJi5uYW1lJiZUZXh0JykpXG4gICAgICAgICAgICArIHJhdGluZ1RleHRcbiAgICAgICAgICAgICsgJ1xcdCdcbiAgICAgICAgICAgICsgZ2V0R3JleVRleHQocGFyc2VEb21Gb3JIdG1sKHJldmlld0h0bWxJdGVtLCAnLm1haW4taGQmJi5tYWluLW1ldGEmJlRleHQnKSk7XG4gICAgICAgIGxldCByZXNwb25zZUh0bWwgPSAnJztcbiAgICAgICAgbGV0IGZlZWRiYWNrID0gJyc7XG4gICAgICAgIHRyeXtcbiAgICAgICAgICAgIGlmICgvKDxhIGhyZWY9XCJodHRwW1xcc1xcU10qP2NsYXNzPVwicmVwbHlbXFxzXFxTXSo/PFxcL2E+KS8udGVzdChyZXZpZXdIdG1sSXRlbSkgPT09IHRydWUpIHJlc3BvbnNlSHRtbCA9IFJlZ0V4cC4kMTtcbiAgICAgICAgICAgIGZlZWRiYWNrID0gZ2V0R3JleVRleHQoJ/CfkY3wn4+7JyArIHBhcnNlRG9tRm9ySHRtbChyZXZpZXdIdG1sSXRlbSwgJy5hY3Rpb24mJi5hY3Rpb24tYnRuLnVwJiZUZXh0JylcbiAgICAgICAgICAgICAgICArICdcXHQnXG4gICAgICAgICAgICAgICAgKyAn8J+RjvCfj7snICsgcGFyc2VEb21Gb3JIdG1sKHJldmlld0h0bWxJdGVtLCAnLmFjdGlvbiYmLmFjdGlvbi1idG4uZG93biYmVGV4dCcpXG4gICAgICAgICAgICAgICAgKyAnXFx0J1xuICAgICAgICAgICAgICAgICsgcmVzcG9uc2VIdG1sXG4gICAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlKSB7IH1cbiAgICAgICAgZENvbnRlbnQgPSBjb250ZW50XG4gICAgICAgICAgICArICc8YnI+J1xuICAgICAgICAgICAgKyBnZXRDb21tZW50TWV0YShtZXRhKVxuICAgICAgICAgICAgKyAoZmVlZGJhY2sgPT09ICcnID9cbiAgICAgICAgICAgICAgICAgICAgJydcbiAgICAgICAgICAgICAgICAgICAgOiAoJzxicj4nICsgZ2V0Q29tbWVudE1ldGEoZmVlZGJhY2spKVxuICAgICAgICAgICAgKTtcbiAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgIHRpdGxlOiBkQ29udGVudFxuICAgICAgICAgICAgICAgIC5yZXBsYWNlKC88YSBjbGFzcz1cInNvdXJjZS1pY29uXCJbXFxzXFxTXSo/PFxcL2E+L2csICcnKVxuICAgICAgICAgICAgICAgIC5yZXBsYWNlKC9cXChbXFxzXFxTXVtcXHJcXG5dPGEgaHJlZj1cImphdmFzY3JpcHQ6O1wiW1xcc1xcU10qP3RpdGxlPVwi5bGV5byAXCI+5bGV5byAPFxcL2E+XFwpL2csICcnKVxuICAgICAgICAgICAgICAgIC5yZXBsYWNlV2l0aENhbGxiYWNrKC8oPHAgY2xhc3M9XCJzcG9pbGVyLXRpcFwiPiguKj8pPFxcL3A+KS9nLFxuICAgICAgICAgICAgICAgICAgICAnPGJsb2NrcXVvdGUgY2xhc3M9XCJzcG9pbGVyLXRpcFwiPnvmnInliafpgI99PC9ibG9ja3F1b3RlPicsXG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChzb3VyY2UsIHNlYXJjaFZhbHVlLCByZXBsYWNlVmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCByZXR1cm5WYWx1ZSA9IHNvdXJjZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzZWFyY2hWYWx1ZS50ZXN0KHNvdXJjZSkgPT09IHRydWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVwbGFjZVRleHQgPSBSZWdFeHAuJDI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVwbGFjZVRleHQgPSByZXBsYWNlVGV4dCA9PT0gJycgPyBSZWdFeHAuJDEgOiByZXBsYWNlVmFsdWUucmVwbGFjZSgne+acieWJp+mAj30nLCByZXBsYWNlVGV4dCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuVmFsdWUgPSBzb3VyY2UucmVwbGFjZShSZWdFeHAuJDEsIHJlcGxhY2VUZXh0KVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJldHVyblZhbHVlO1xuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICB9KTtcbiAgICAgICAgaWYgKGkgPCByZXZpZXdzX2NvbnRlbnRfaHRtbF9hcnJheS5sZW5ndGggLSAxKSB7XG4gICAgICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZSdcbiAgICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICB9XG59IGNhdGNoIChlKSB7IH1cblxucmVzLmRhdGEgPSBkO1xuc2V0SG9tZVJlc3VsdChyZXMpOyIsInNkZXRhaWxfY29sX3R5cGUiOiJyaWNoX3RleHQiLCJzZGV0YWlsX2ZpbmRfcnVsZSI6IioiLCJ1YSI6InBjIiwicHJlUnVsZSI6Ii8qKlxuICog5piv5ZCm5byA5ZCv6KeG55WM5pCc77yM5byA5ZCv5ZCO54K55Ye756ys5LiA6aG55Y2z5Y+v5L2/55SoXG4gKlxuICog6Iul5LiN5byA5ZCv5YiZ54K55Ye75Li65p+l55yL5Y6f5paHXG4gKlxuICog5byA5ZCvLzEg5LiN5byA5ZCvLzBcbiAqL1xubGV0IG9wZW5IaWtlclNlYXJjaCA9IDE7XG4vLyBkZXNjIOaPj+i/sOeahOS4ieihjOS4reavj+ihjOeahOacgOWkp+mVv+W6plxubGV0IGRlc2NMaW5lT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