animebook / animebook.github.io

In-browser video player for learning Japanese with subtitles
https://animebook.github.io
MIT License
273 stars 29 forks source link

Animebook + Yomichan + Microsoft Edge #5

Closed Arctagon closed 4 years ago

Arctagon commented 4 years ago

Hello,

Animebook is working great on Microsoft Edge, so I would like to use it in this browser. I've also set up Yomichan so I can use it in Animebook, but the problem is that, for whatever reason, I get no popups from Yomichan at all on https://animebook.github.io/. I've double checked, and I'm using the exact same Yomichan settings as on Chrome (it works on Chrome), and Yomichan works on all other websites on Edge, including https://video.fluentcards.com/. It makes it seem to me that the problem lies with Animebook.

Let me know if there's any other kind of information I can provide.

soamsy commented 4 years ago

Probably not the case, but did you download the html file and use it locally? If so, then this setting should be enabled for Yomichan. image

Otherwise, I'm not sure why it wouldn't work. I have had random issues where yomichan stops working if I leave the tab open for too long, but it's always resolved by refreshing the page and dropping my files back in. A screenshot/gif might help here. And I guess you could also upload your yomichan settings as json if you want. That might help me reproduce it if I use your exact settings.

Arctagon commented 4 years ago

I only tried to download the html file and use it locally as a way to fix the problem, but was unable to get it to play any files at all. When I try to move video and sub files over to the local html file in the browser, all that happens is that a new tab opens up. For sub files it looks like this: msedge_ak7axdOpaq (2) I noticed that when I hover over the browser with the files, it says 'move' when it's on the web version, but 'copy' when it's on the local version. Maybe it has something to do with that. It would be nice to get the local html to work for different reasons (I don't always have access to the Internet), so if I'm doing wrong, let me know.

I enabled access to file URLs when I first set up Yomichan with Edge just in case, so it's always been ticked off. I also have identical Yomichan settings in Edge and Chrome, and everything works in Chrome. I would share the settings I use, but it looks like I can't upload .json files here.

wO7BOOoYiL

soamsy commented 4 years ago

If you right click on the page at animebook.github.io and click "Save As", it'll give you a broken version of the site. Use this instead (I should probably update the README with this) https://raw.githubusercontent.com/animebook/animebook.github.io/master/index.html

And yeah, might be best to just paste the json into github (this'll be big) e.g.

{
    "version": 0,
    "date": "2020-08-26 20:53:39",
    "url": "chrome-extension://ogmnaimimemjmbakcfefmnahgdfhfami/",
    "manifest": {
        "applications": {
            "gecko": {
                "id": "alex@foosoft.net",
                "strict_min_version": "55.0"
            }
        },
        "author": "Alex Yatskov",
        "background": {
            "page": "bg/background.html",
            "persistent": true
        },
        "browser_action": {
            "default_icon": {
                "16": "mixed/img/icon16.png",
                "19": "mixed/img/icon19.png",
                "32": "mixed/img/icon32.png",
                "38": "mixed/img/icon38.png",
                "48": "mixed/img/icon48.png",
                "64": "mixed/img/icon48.png",
                "128": "mixed/img/icon128.png"
            },
            "default_popup": "bg/context.html",
            "default_title": "Yomichan"
        },
        "commands": {
            "search": {
                "description": "Open search window",
                "suggested_key": {
                    "default": "Alt+Insert"
                }
            },
            "toggle": {
                "description": "Toggle text scanning",
                "suggested_key": {
                    "default": "Alt+Delete"
                }
            }
        },
        "content_scripts": [
            {
                "all_frames": true,
                "js": [
                    "mixed/js/core.js",
                    "mixed/js/yomichan.js",
                    "mixed/js/comm.js",
                    "mixed/js/dom.js",
                    "mixed/js/api.js",
                    "mixed/js/dynamic-loader.js",
                    "mixed/js/frame-client.js",
                    "mixed/js/text-scanner.js",
                    "fg/js/document.js",
                    "fg/js/dom-text-scanner.js",
                    "fg/js/popup.js",
                    "fg/js/source.js",
                    "fg/js/popup-factory.js",
                    "fg/js/frame-offset-forwarder.js",
                    "fg/js/popup-proxy.js",
                    "fg/js/frontend.js",
                    "fg/js/content-script-main.js"
                ],
                "match_about_blank": true,
                "matches": [
                    "http://*/*",
                    "https://*/*",
                    "file://*/*"
                ]
            }
        ],
        "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'",
        "description": "Japanese dictionary with Anki integration",
        "differential_fingerprint": "1.b765d82456c44ad012f0e92e5b65dda054f60c8338138dcfde845c61878b8daa",
        "icons": {
            "16": "mixed/img/icon16.png",
            "19": "mixed/img/icon19.png",
            "32": "mixed/img/icon32.png",
            "38": "mixed/img/icon38.png",
            "48": "mixed/img/icon48.png",
            "64": "mixed/img/icon48.png",
            "128": "mixed/img/icon128.png"
        },
        "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAug/0Wtc35jGyy+Jkf4Kt9DUAzvziCJbhwlwzdro0cPnN+2K6Y2rCBVgAJln7SffCKVWa0k6BM3D7m7yydAECgSo8VUn2zUgInXpfQAuI2dG+6OEi0SOu2SkXJFvvAMjM/JAXY0zQRofnxeDRqvT7EtHW9lLwtgLTBuJObuq5zCHAPFa3PZ5ZORvUEmQZ2HDxUxaUZzsFW4kZ/rxPaNXTWe+qM30wqvlk79DBUJVq9zlzsDGM6G5qWcCk3vT5MEGuZVK7IPi6w9dPfOA3myicuywhDxumteg6wFraarMMAR2Stc80Yb9pCZT5Jav9e7eG97DuBAh97IOKrfI6mU8CkwIDAQAB",
        "manifest_version": 2,
        "minimum_chrome_version": "57.0.0.0",
        "name": "Yomichan",
        "optional_permissions": [
            "clipboardRead"
        ],
        "options_page": "bg/settings.html",
        "options_ui": {
            "open_in_tab": true,
            "page": "bg/settings.html"
        },
        "permissions": [
            "<all_urls>",
            "storage",
            "clipboardWrite",
            "unlimitedStorage",
            "nativeMessaging",
            "webRequest",
            "webRequestBlocking"
        ],
        "update_url": "https://clients2.google.com/service/update2/crx",
        "version": "20.8.3.0",
        "web_accessible_resources": [
            "fg/float.html"
        ]
    },
    "environment": {
        "browser": "edge",
        "platform": {
            "os": "win"
        },
        "modifiers": {
            "keys": [
                {
                    "value": "alt",
                    "name": "Alt"
                },
                {
                    "value": "ctrl",
                    "name": "Ctrl"
                },
                {
                    "value": "shift",
                    "name": "Shift"
                },
                {
                    "value": "meta",
                    "name": "Windows"
                }
            ],
            "separator": " + "
        }
    },
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36 Edg/84.0.522.63",
    "options": {
        "profiles": [
            {
                "name": "Default",
                "options": {
                    "general": {
                        "enable": true,
                        "resultOutputMode": "group",
                        "debugInfo": false,
                        "maxResults": 32,
                        "showAdvanced": true,
                        "popupDisplayMode": "default",
                        "popupWidth": 450,
                        "popupHeight": 350,
                        "popupHorizontalOffset": 0,
                        "popupVerticalOffset": 10,
                        "popupHorizontalOffset2": 10,
                        "popupVerticalOffset2": 0,
                        "popupHorizontalTextPosition": "below",
                        "popupVerticalTextPosition": "before",
                        "showGuide": false,
                        "compactTags": true,
                        "compactGlossaries": false,
                        "mainDictionary": "三省堂 スーパー大辞林",
                        "popupTheme": "dark",
                        "popupOuterTheme": "default",
                        "customPopupCss": "body { background-color: #282424}\n",
                        "customPopupOuterCss": "",
                        "enableWanakana": true,
                        "enableClipboardMonitor": false,
                        "enableClipboardPopups": false,
                        "popupScalingFactor": 1,
                        "popupScaleRelativeToPageZoom": false,
                        "popupScaleRelativeToVisualViewport": false,
                        "showPitchAccentDownstepNotation": true,
                        "showPitchAccentPositionNotation": true,
                        "showPitchAccentGraph": false,
                        "showIframePopupsInRootFrame": false,
                        "useSecurePopupFrameUrl": true,
                        "usePopupShadowDom": true
                    },
                    "audio": {
                        "enabled": true,
                        "sources": [
                            "jpod101",
                            "jisho"
                        ],
                        "volume": 100,
                        "autoPlay": false,
                        "customSourceUrl": "",
                        "textToSpeechVoice": ""
                    },
                    "scanning": {
                        "middleMouse": false,
                        "touchInputEnabled": true,
                        "selectText": false,
                        "alphanumeric": true,
                        "autoHideResults": true,
                        "delay": 20,
                        "length": 10,
                        "modifier": "none",
                        "deepDomScan": false,
                        "popupNestingMaxDepth": 1,
                        "enablePopupSearch": false,
                        "enableOnPopupExpressions": true,
                        "enableOnSearchPage": true,
                        "enableSearchTags": false,
                        "layoutAwareScan": false
                    },
                    "dictionaries": {
                        "三省堂 スーパー大辞林": {
                            "priority": 0,
                            "enabled": true,
                            "allowSecondarySearches": false
                        },
                        "新明解国語辞典 第五版": {
                            "priority": 1,
                            "enabled": true,
                            "allowSecondarySearches": false
                        },
                        "JMdict (English)": {
                            "priority": 2,
                            "enabled": true,
                            "allowSecondarySearches": false
                        },
                        "KANJIDIC (English)": {
                            "priority": 3,
                            "enabled": true,
                            "allowSecondarySearches": false
                        },
                        "Anime & Jdrama Freq:": {
                            "priority": 0,
                            "enabled": true,
                            "allowSecondarySearches": false
                        },
                        "Innocent Corpus": {
                            "priority": 0,
                            "enabled": true,
                            "allowSecondarySearches": false
                        }
                    },
                    "parsing": {
                        "enableScanningParser": true,
                        "enableMecabParser": false,
                        "selectedParser": "scan",
                        "readingMode": "hiragana",
                        "termSpacing": true
                    },
                    "anki": {
                        "enable": true,
                        "server": "http://127.0.0.1:8765",
                        "tags": [
                            "yomichan"
                        ],
                        "sentenceExt": 200,
                        "screenshot": {
                            "format": "png",
                            "quality": 92
                        },
                        "terms": {
                            "deck": "日本語::Mining",
                            "model": "文章",
                            "fields": {
                                "Word": "{expression}",
                                "Meaning": "{glossary}",
                                "Reading": "{reading}",
                                "Expression": "{sentence}",
                                "Audio": "{audio}",
                                "SentenceAudio": "",
                                "Image": "",
                                "Hint": "",
                                "Lookalike": "",
                                "PreCloze": "",
                                "PostCloze": "",
                                "Pronunciation": ""
                            }
                        },
                        "kanji": {
                            "deck": "",
                            "model": "",
                            "fields": {}
                        },
                        "duplicateScope": "collection"
                    },
                    "version": 14,
                    "translation": {
                        "convertHalfWidthCharacters": "false",
                        "convertNumericCharacters": "false",
                        "convertAlphabeticCharacters": "false",
                        "convertHiraganaToKatakana": "false",
                        "convertKatakanaToHiragana": "variant",
                        "collapseEmphaticSequences": "true"
                    }
                },
                "conditionGroups": []
            },
            {
                "name": "Must hold shift",
                "options": {
                    "general": {
                        "enable": true,
                        "resultOutputMode": "group",
                        "debugInfo": false,
                        "maxResults": 32,
                        "showAdvanced": true,
                        "popupDisplayMode": "default",
                        "popupWidth": 450,
                        "popupHeight": 350,
                        "popupHorizontalOffset": 0,
                        "popupVerticalOffset": 14,
                        "popupHorizontalOffset2": 10,
                        "popupVerticalOffset2": 0,
                        "popupHorizontalTextPosition": "below",
                        "popupVerticalTextPosition": "before",
                        "showGuide": false,
                        "compactTags": true,
                        "compactGlossaries": false,
                        "mainDictionary": "三省堂 スーパー大辞林",
                        "popupTheme": "dark",
                        "popupOuterTheme": "default",
                        "customPopupCss": "body { background-color: #282424}\n",
                        "customPopupOuterCss": "",
                        "enableWanakana": true,
                        "enableClipboardMonitor": false,
                        "enableClipboardPopups": false,
                        "popupScalingFactor": 1,
                        "popupScaleRelativeToPageZoom": true,
                        "popupScaleRelativeToVisualViewport": true,
                        "showPitchAccentDownstepNotation": true,
                        "showPitchAccentPositionNotation": true,
                        "showPitchAccentGraph": false,
                        "showIframePopupsInRootFrame": false,
                        "useSecurePopupFrameUrl": true,
                        "usePopupShadowDom": true
                    },
                    "audio": {
                        "enabled": true,
                        "sources": [
                            "jpod101",
                            "jisho"
                        ],
                        "volume": 100,
                        "autoPlay": false,
                        "customSourceUrl": "",
                        "textToSpeechVoice": ""
                    },
                    "scanning": {
                        "middleMouse": false,
                        "touchInputEnabled": true,
                        "selectText": false,
                        "alphanumeric": true,
                        "autoHideResults": true,
                        "delay": 20,
                        "length": 10,
                        "modifier": "shift",
                        "deepDomScan": false,
                        "popupNestingMaxDepth": 1,
                        "enablePopupSearch": false,
                        "enableOnPopupExpressions": true,
                        "enableOnSearchPage": true,
                        "enableSearchTags": false,
                        "layoutAwareScan": false
                    },
                    "dictionaries": {
                        "三省堂 スーパー大辞林": {
                            "priority": 0,
                            "enabled": true,
                            "allowSecondarySearches": false
                        },
                        "Anime & Jdrama Freq:": {
                            "priority": 0,
                            "enabled": true,
                            "allowSecondarySearches": false
                        },
                        "KireiCake": {
                            "priority": 0,
                            "enabled": true,
                            "allowSecondarySearches": false
                        },
                        "新明解国語辞典 第五版": {
                            "priority": 0,
                            "enabled": true,
                            "allowSecondarySearches": false
                        },
                        "JMdict (English)": {
                            "priority": 0,
                            "enabled": true,
                            "allowSecondarySearches": false
                        },
                        "Kanjium Pitch Accents": {
                            "priority": 0,
                            "enabled": true,
                            "allowSecondarySearches": false
                        },
                        "Innocent Corpus": {
                            "priority": 0,
                            "enabled": true,
                            "allowSecondarySearches": false
                        },
                        "JMnedict": {
                            "priority": 0,
                            "enabled": true,
                            "allowSecondarySearches": false
                        },
                        "KANJIDIC (English)": {
                            "priority": 0,
                            "enabled": true,
                            "allowSecondarySearches": false
                        }
                    },
                    "parsing": {
                        "enableScanningParser": true,
                        "enableMecabParser": false,
                        "selectedParser": "scan",
                        "readingMode": "hiragana",
                        "termSpacing": true
                    },
                    "anki": {
                        "enable": true,
                        "server": "http://127.0.0.1:8765",
                        "tags": [
                            "yomichan"
                        ],
                        "sentenceExt": 200,
                        "screenshot": {
                            "format": "png",
                            "quality": 92
                        },
                        "terms": {
                            "deck": "日本語::Mining",
                            "model": "文章",
                            "fields": {
                                "Word": "{expression}",
                                "Meaning": "{glossary}",
                                "Reading": "{reading}",
                                "Expression": "{sentence}",
                                "Audio": "{audio}",
                                "SentenceAudio": "",
                                "Image": "",
                                "Hint": "",
                                "Lookalike": "",
                                "PreCloze": "",
                                "PostCloze": "",
                                "Pronunciation": ""
                            }
                        },
                        "kanji": {
                            "deck": "",
                            "model": "",
                            "fields": {}
                        },
                        "duplicateScope": "collection"
                    },
                    "version": 14,
                    "translation": {
                        "convertHalfWidthCharacters": "false",
                        "convertNumericCharacters": "false",
                        "convertAlphabeticCharacters": "false",
                        "convertHiraganaToKatakana": "false",
                        "convertKatakanaToHiragana": "variant",
                        "collapseEmphaticSequences": "true"
                    }
                },
                "conditionGroups": [
                    {
                        "conditions": [
                            {
                                "type": "popupLevel",
                                "operator": "equal",
                                "value": 1
                            }
                        ]
                    }
                ]
            }
        ],
        "profileCurrent": 0,
        "version": 3,
        "global": {
            "database": {
                "prefixWildcardsSupported": false
            }
        }
    }
}
Arctagon commented 4 years ago

Thanks, using the html file you linked locally worked perfectly. And this also made me realise what is causing the issue, because Yomichan worked locally with the html file. I'm using an extension called Zoom, which provides much more accuracy when zooming in on web pages. The default one only allows 100% -> 110% -> 125% -> 150%, etc., whereas the extension allows zooming in and out in increments of 1%. However, when using the extension to zoom in, it messes with Yomichan. It looks like it displaces the text in a way that Yomichan can no longer see it, or something along those lines.

soamsy commented 4 years ago

Oh, nice! Thought it was weird that the buttons in the bottom corner of your screenshot were massive (usually they don't zoom in with the rest of the page).

Arctagon commented 4 years ago

Sorry for the trouble.