Skip to content

Commit

Permalink
fix some small bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
gdh1995 committed Mar 10, 2024
1 parent 86dd5bc commit 4841b58
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 2 additions & 1 deletion content/extend_click_vc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ const docEl = doc0.documentElement;
}
const dataset = (root as Element as TypeToAssert<Element, HTMLElement, "dataset", "tagName">).dataset
const defineProp = Object.defineProperty, dbgLoc = Build.NDEBUG ? null as never : location
const host = location.host || frameElement && (parent as Window).location.host
if (dataset && (
dataset.vimium = kRC,
// only the below can affect outsides
Expand All @@ -293,7 +294,7 @@ if (dataset && (
timer = toRegister.length > 0 ? setTimeout_(next, InnerConsts.DelayForNext) : 0
ETP[kAEL] = myAEL
FProto[kToS] = myToStr
if (!(<RegExpOne> /\.(bing\.com|google\.com(\.\w+)?)$/).test("." + location.host)) {
if (host && !(<RegExpOne> /\.(bing\.com|google\.com(\.\w+)?)$/).test("." + host)) {
try { evaledAEL = new Function(`let ${kAEL}=(f,a)=>f(...a)\nreturn ` + kAEL)() } catch {}
}
for (let i of [0, 2] as const) { /*#__ENABLE_SCOPED__*/
Expand Down
6 changes: 2 additions & 4 deletions content/local_links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
kSafeAllSelector, coreHints, addChildFrame_, mode1_, forHover_, hintOptions, wantDialogMode_,
isClickListened_, set_isClickListened_, tooHigh_, useFilter_, hintChars, hintManager
} from "./link_hints"
import { shouldScroll_s, getPixelScaleToScroll, scrolled, set_scrolled, suppressScroll } from "./scroller"
import { shouldScroll_s, getPixelScaleToScroll, scrolled, suppressScroll } from "./scroller"
import { ui_root, ui_box, helpBox, curModalElement, filterOutInert } from "./dom_ui"
import { generateHintText } from "./hint_filters"

Expand Down Expand Up @@ -509,7 +509,6 @@ const isOtherClickable = (hints: Hint[], element: NonHTMLButFormattedElement | S
console.log("Assert error: `!wantClickable if wholeDoc` in VHints.traverse_");
}
} else {
scrolled === 1 && suppressScroll();
if (wantClickable && !matchSelector) { // deduplicate
((list: Hint[]): void => {
const D = "div"
Expand All @@ -525,6 +524,7 @@ const isOtherClickable = (hints: Hint[], element: NonHTMLButFormattedElement | S
j++
}
}
scrolled === 1 && suppressScroll()
while (0 <= --i) {
k = list[i][2];
notRemoveParents = k === ClickType.classname;
Expand Down Expand Up @@ -641,7 +641,6 @@ const isOtherClickable = (hints: Hint[], element: NonHTMLButFormattedElement | S
})
}
}
const hasHookedScroll = scrolled
if (!OnFirefox && !OnEdge && ui_root && !wholeDoc && (!OnChrome || noClosedShadow === 1)
&& (OnChrome && Build.MinCVer >= BrowserVer.MinShadowDOMV0 || ui_root !== ui_box)
&& (Build.NDEBUG && (!OnChrome || Build.MinCVer >= BrowserVer.MinEnsuredShadowDOMV1)
Expand All @@ -655,7 +654,6 @@ const isOtherClickable = (hints: Hint[], element: NonHTMLButFormattedElement | S
for (const i of cur_arr as ArrayLike<Element> as Element[]) { htmlTag_<1>(i) && filter(output, i) }
}
set_bZoom_(localBZoom)
hasHookedScroll || set_scrolled(0)
}
clickTypeFilter_ = 0
return output
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"rebuild": "gulp rebuild",
"edge": "bash -c \"BUILD_BTypes=1 BUILD_MinCVer=${BUILD_MinCVer:-102} BUILD_NeedCommit=1 BUILD_EdgeC=1 gulp dist && IN_DIST=1 BUILD_EdgeC=1 ./scripts/make.sh\"",
"chrome": "bash -c \"BUILD_BTypes=1 BUILD_MinCVer=${BUILD_MinCVer:-102} BUILD_NeedCommit=1 gulp dist && IN_DIST=1 ./scripts/make.sh\"",
"csize": "bash -c \"BUILD_BTypes=${BUILD_BTypes:-1} BUILD_MinCVer=${BUILD_MinCVer:-102} BUILD_NeedCommit=0 gulp content/size",
"csize": "bash -c \"BUILD_BTypes=${BUILD_BTypes:-1} BUILD_MinCVer=${BUILD_MinCVer:-102} BUILD_NeedCommit=0 gulp content/size\"",
"mv3-firefox": "bash -c \"BUILD_BTypes=2 BUILD_MinFFVer=${BUILD_MinFFVer:-102} BUILD_NeedCommit=1 gulp dist && IN_DIST=1 ./scripts/make.sh\"",
"debug": "bash -c \"BUILD_MinCVer=${BUILD_MinCVer:-102} gulp local2\"",
"legacy": "bash -c \"BUILD_MinCVer=${BUILD_MinCVer:-93} BUILD_MinFFVer=${BUILD_MinFFVer:-89} gulp local2\"",
Expand Down

0 comments on commit 4841b58

Please sign in to comment.