Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:网页插件¥js_url¥global_chatGPTtoolsPlus(修改版)@base64://Ly8gPT1Vc2VyU2NyaXB0PT0KLy8gQG5hbWUgICAgICAgICBjaGF0R1BUIHRvb2xzIFBsdXPvvIjkv67mlLnniYjvvIkKLy8gQG5hbWVzcGFjZSAgICBodHRwOi8vdGFtcGVybW9ua2V5Lm5ldC8KLy8gQHZlcnNpb24gICAgICAxLjEuNgovLyBAZGVzY3JpcHRpb24gIEdvb2dsZeOAgeW/heW6lOOAgeeZvuW6puOAgVlhbmRleOOAgTM2MOaQnOe0ouOAgeiwt+atjOmVnOWDj+OAgUZzb3XkvqfovrnmoI9DaGF05pCc57Si77yM5Y2z5Yi75L2T6aqMQUnvvIzml6DpnIDnv7vlopnvvIzml6DpnIDms6jlhozvvIzml6DpnIDnrYnlvoXvvIEKLy8gQGF1dGhvciAgICAgICDlpJzpm6gKLy8gQG1hdGNoICAgICAgICBodHRwczovL2NuLmJpbmcuY29tLyoKLy8gQG1hdGNoICAgICAgICBodHRwczovL3d3dy5iaW5nLmNvbS8qCi8vIEBtYXRjaCAgICAgIGh0dHBzOi8vY2hhdC5vcGVuYWkuY29tL2NoYXQKLy8gQG1hdGNoICAgICAgaHR0cHM6Ly93d3cuZ29vZ2xlLmNvbS8qCi8vIEBtYXRjaCAgICAgIGh0dHBzOi8vd3d3LnNvLmNvbS9zKgovLyBAbWF0Y2ggICAgICBodHRwKjovL3d3dy5iYWlkdS5jb20vcyoKLy8gQG1hdGNoICAgICAgaHR0cHM6Ly93d3cuYmFpZHUuY29tKgovLyBAbWF0Y2ggICAgICBodHRwczovL20uYmFpZHUuY29tLyoKLy8gQG1hdGNoICAgICAgaHR0cCo6Ly95YW5kZXgucnUvc2VhcmNoKgovLyBAbWF0Y2ggICAgICBodHRwKjovL3lhbmRleC5jb20vc2VhcmNoKgovLyBAbWF0Y2ggICAgICBodHRwczovL3NlYXJjaC5lY251L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