ashchan / safarikai Goto Github PK
View Code? Open in Web Editor NEWSafari extension for translating Japanese words.
Home Page: https://itunes.apple.com/us/app/safarikai/id1437951175?ls=1&mt=12
Safari extension for translating Japanese words.
Home Page: https://itunes.apple.com/us/app/safarikai/id1437951175?ls=1&mt=12
Just opens an empty tab, nothing else...
Hello, I'm getting the following error:
“Safarikai” is no longer supported. You can find newer extensions reviewed by Apple in the App Store or Safari Extensions Gallery
I'm using Mojave Public Beta 5, I'm not sure when this extension stopped working, since i just found it recently. Would it be possible to submit it to the app store as an official extension?
It would be helpful to be able to toggle the translation overlay via a hotkey. When navigating webpages with lots of Japanese text that is placed all over place (ie, Rakuten) the popup can cover other parts of the page. If this already exists I just haven't been able to find how to enable it the settings or documentation.
At line 57 of injected.coffee:
range = @doc.caretRangeFromPoint @clientx, @clientY
it is possible that caretRangeFromPoint returns null. The next line range.startContainer may then throw an exception which goes unhandled. Apps like Microsoft's Word Online or PowerPoint Online will not handle these well.
Perhaps a null check is in order?
Would it be possible to update this to include support for Chinese characters (Simplified and Traditional) via CDICT?
Decoding DictData
with default Decodable
for data.json
takes about 6 seconds. This would become worse when we add names and other data.
Ver 2.3 was binary rejected as there's no way for user to re-open the window. Sigh...
I believe this requires some tool to convert EDICT, ENAMDICT to the JS format (or find a better than SQLite solution to store). Now that this extension is alive again, it makes sense to continue updating.
It's a history thing.
dictionary.coffee
injected.coffee
It will be great if there is a future we can add a word to a word list (tabular.txt or something) so we can use such list to make Anki deck afterwards. This will ad way more productivity to the learning process!
Fetch newest EDICT from edrdg.org and write a script to convert to JSON, or just read directly to Swift.
Note: prefer the JMdict or EDICT2 format. As:
There are now two EDICT versions:
A. the plain EDICT file. This is the original format, where there is only one kanji form and one reading per entry. I regard this as a legacy format, and only provide it for older applications. PLEASE do not use this format for new applications, as I would like to withdraw it one day.
B. the enhanced "EDICT2" format. This can have multiple kanji forms and readings in an entry, and also has other information such as cross-references, restrictions, etc. and also uses kanji from the extensions in the JIS X 0212 standard. It has almost all the information in the full JMdict format. This form should be used for all new applications.
Source: http://www.edrdg.org/jmdict/edict.html
edict2u
should be used since it's UTF8 encoded, while edict2
is EUC-JP.
When typing a message in Japanese in Facebook messenger, if the mouse is moved over some Japanese text (for example a previous message) the message being typed (if still underlined for kanji selection) disappears. A simple fix would be to have the option to blacklist sites from using the extension (If this is already possible please let me know!).
A friend writes:
Do you know if older versions of Safarikai are available anywhere? The one at the AppStore requires
OSX 10.13 but I am using an older MacPro that won't let me install anything above 10.11.
Not likely to use it for dictionary data.
WIP on branch clean-up.
Started making v2.0 as a Safari App Extension.
If it goes well, the new version will be released on Mac App Store.
It's very likely the dictionary lookup logic will go to native Swift part, and by doing so it might be able to use a more recent copy of EDICT.
Ideally, the EDICT will be a SQLITE3 bundled and queried with native code. This means the injected JavaScript only handles pointing and picking Japanese word, looking up and showing result with the HTML page.
The WIP branch is app-extension.
Using the example below, Safarikai selects each individual character instead of selecting 見に来る as a single range.
見に来る
Safarikai runs great on Apple Silicon through Rosetta 2, but a native version would be great!
Do some research first.
See #5
Thank you for developing this great extension. Is there any chance of a dark mode, or custom colour settings? The current white window is quite jarring when you've customised your OS and browser to be as dark as possible.
This behavior has changed since the new app-extension version. In the old version clicking the icon would make it grayer as to indicate it was turned off.
Is it possible to restore this behavior?
When hovering over a word, result popup also appears in child iframe
documents.
I noticed this when viewing a page with several ads embedded via iframes.
Seeing multiple result boxes was very distracting.
I used W3Schools' iframe test page to reproduce this.
HTML typed into the editor will show within an iframe.
When hovering over a word (that I type into the test editor), a Safarikai popup is added to the main test result's iframe, as well as any iframes within that one.
In short, popups are added recursively to all iframes within the document hierarchy.
OS Version: 10.13.5 (17F77)
Safari Version: 11.1.1 (13605.2.8)
Safari 7.0.4, if I enable the plugin, it breaks drag&drop in Roundcube. Might be breaking other apps too, in my case it was Roundcube.
I will also try to investigate what's the problem if I have time.
I was just about to create my own, but found yours instead!
This plugin would be more developer friendly if it was written in vanilla JavaScript, but I guess some people like their coffee 😄
However, it would make contributions easier if you publish japanese-kit
to the NPM registry in order to be able to npm install
without the hassle of downloading that other repo directly.
👍
It doesn't highlight the range of text correctly.
As in the title. The Chinese extension (Frill) is no longer usable without workarounds since Apple started forcing extensions to go through their store.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.