Giter Site home page Giter Site logo

Comments (2)

fishjar avatar fishjar commented on May 18, 2024

1.划词翻译按钮不会跟随页面滚动

2.划词翻译按钮的显示位置似乎是鼠标松开时的位置

按钮的位置是鼠标松开的位置,并加上一定偏移量,偏移量可以在设置页面设置。

至于是是否跟随页面滚动,位置基于鼠标还是选中的文字,我觉得每个人习惯不同,且对使用影响不大,就选择了简单的做法。

3.从选择文本时的起点一直到鼠标松开时的位置,在这个范围内点击任何位置翻译按钮都不会消失,以及输入框中删除选中的文本翻译按钮也不会消失

这其实是两个问题:
点击选中的文字,按钮不会消失,因为鼠标松开时,文字仍在选中状态,我将加上一点延迟来修复此问题。
输入框的内容删除后按钮也不消失,是因为仅监听鼠标松开事件,没有监听键盘事件。如果同时监听键盘事件,比如按crl+a,可能出现没法设定钮位置的情况。

4.有些地方翻译会跑到最下面,这会导致看起来很乱 有问题的页面 screenshot20231110 (7)

这个很乱的原因是页面的内容不规范,可通过注入修复补丁来解决,不过目前修复补丁是订阅的方式,不能自定义添加,不是很方便,后面会考虑如何改进一下。

from kiss-translator.

fishjar avatar fishjar commented on May 18, 2024

新版可以自行增加webfix的规则:

Screenshot from 2023-11-17 11-46-52

然后翻译 页面 效果如下:

Screenshot from 2023-11-17 11-45-02

from kiss-translator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.