fix scanning start of line on Firefox
On many sites, for example Twitter (posts), Yomichan doesn't match any text from the beginning of the line unless you move the mouse cursor to the top left corner of the word that starts from the beginning of the line. Apparently there were some problems related to the imposter and there was commit0cc5566
adding a fix for it, but this seemed to cause problems and542cdb2
was added to fix that. It didn't handle all of the cases, though, so this commit is letting everything through on Firefox.
This commit is contained in:
parent
567b136f5f
commit
cfb5f0b9e1
@ -102,6 +102,10 @@ function docRangeFromPoint(point) {
|
||||
return new TextSourceRange(range);
|
||||
}
|
||||
}
|
||||
|
||||
if (navigator.userAgent.match(/Firefox/)) {
|
||||
return new TextSourceRange(range);
|
||||
}
|
||||
}
|
||||
|
||||
function docSentenceExtract(source, extent) {
|
||||
|
Loading…
Reference in New Issue
Block a user