Skip to content

Commit

Permalink
rollback mouseover interval
Browse files Browse the repository at this point in the history
  • Loading branch information
ttop32 committed May 10, 2024
1 parent f51f9b3 commit a21bcf6
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/contentScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,7 @@ function applyStyleSetting() {
left: 0 !important;
top: 0 !important;
width: 1000px !important;
margin: 0px !important;
margin-left: -500px !important;
position: fixed !important;
z-index: 100000200 !important;
Expand Down
6 changes: 3 additions & 3 deletions src/event/mouseover.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// 4. range to text

import * as util from "/src/util";
import {debounce} from "lodash";
import { debounce } from "lodash";

var clientX = 0;
var clientY = 0;
Expand All @@ -16,11 +16,11 @@ const PARENT_TAGS_TO_EXCLUDE = ["STYLE", "SCRIPT", "TITLE"];

export function enableMouseoverTextEvent(
_window = window,
textDetectTime = 0.1
textDetectTime = 0.7
) {
_win = _window;
textDetectTime = Number(textDetectTime) * 1000;
const triggerMouseoverTextWithDelay = debounce(async() => {
const triggerMouseoverTextWithDelay = debounce(async () => {
triggerMouseoverText(await getMouseoverText(clientX, clientY));
}, textDetectTime);

Expand Down
2 changes: 1 addition & 1 deletion src/event/selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var _win;
var prevNoneSelect = false;
export function enableSelectionEndEvent(
_window = window,
textDetectTime = 0.1
textDetectTime = 0.7
) {
_win = _window;
textDetectTime = Number(textDetectTime) * 1000;
Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ var voiceRateList = util.getRangeOption(0.5, 2.1, 0.1, 1);
var voiceRepeatList = util.getRangeOption(1, 11);
var tooltipBackgroundBlurList = util.getRangeOption(0, 21);
var distanceList = util.getRangeOption(0, 41);
var tooltipIntervalTimeList = util.getRangeOption(0.1, 2.1, 0.1, 1);
var tooltipIntervalTimeList = util.getRangeOption(0.5, 2.1, 0.1, 1);
var tooltipPositionList = {
Follow: "follow",
Expand Down
2 changes: 1 addition & 1 deletion src/util/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export var defaultData = {
ignoreCallbackOptionList: ["historyList"],
popupCount: "0",
langPriority: { auto: 9999999, null: 9999999 },
tooltipIntervalTime: "0.1",
tooltipIntervalTime: "0.7",

cardPlayMeta: ["image"],
cardTagSelected: [],
Expand Down

0 comments on commit a21bcf6

Please sign in to comment.