ken107 / read-aloud

An awesome browser extension that reads aloud webpage content with one click
https://readaloud.app
MIT License
1.31k stars 226 forks source link

legado app Web service:Support page turning #309

Closed yuhldr closed 1 year ago

yuhldr commented 1 year ago

legado 这个项目,在手机上读书很方便,也可以在浏览器打开,添加了电脑端读书支持,可以自动翻页。如下图

image image

ken107 commented 1 year ago

Please modify the match condition else if location.pathname.... That needs to match hostname as well to ensure it only runs on the site it intended to run on.

yuhldr commented 1 year ago

Please modify the match condition else if location.pathname.... That needs to match hostname as well to ensure it only runs on the site it intended to run on.

This hostname is not fixed, because this is to open the port 1122 on the mobile phone software, and then the computer accesses the port 1122 of the mobile phone IP, and the computer can read the books in this APP. This app (legado) optimizes many online websites and also supports many formats of local books, which is very convenient

Can I load this configuration when hostname matches the IP address and also matches 'location.pathname' like this

  else if (isIPAddress(location.hostname)
      && location.port === "1122"
      && location.protocol === "http:"
      && location.pathname === "/bookshelf/index.html") return  ["js/content/yd-app-web.js"];

Screenshot_2023-03-08-19-46-07-378-edit_io legado app release

ken107 commented 1 year ago

Thank you, please test my change