-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #18. Squashed commit of the following: commit 69242a334fa6cfe823bfd836be4f570b88699b89 Author: John Dunning <[email protected]> Date: Wed Apr 29 00:09:14 2020 -0700 Update release date commit 32a920131ceedbbed7235f1971614fe1a596b8e6 Author: John Dunning <[email protected]> Date: Wed Apr 29 00:05:14 2020 -0700 Update version to 1.5.0 Update chrome-store-description.txt with info about the new features and reasons for bookmarks and storage permissions. Update edge-store-description.txt to track the latest from Chrome. Update releases/index.md for 1.5.0. commit 27088cc1d65e58955319750222645be495313281 Author: John Dunning <[email protected]> Date: Sun Apr 19 19:46:42 2020 -0700 Add an upgrade message for users with open tabs that have Chinese characters Default usePinyin on for users who have set their browser language to Chinese, regardless of open tabs. Support dark mode for the update message. Move the include closed tabs setting to the top of the list. Add a Language string to constants.js based on the browser language. commit ad53ad1429ff71a6c03aae13b514e42ee460cec5 Author: John Dunning <[email protected]> Date: Sun Apr 26 15:38:59 2020 -0700 Fix bug where matches from initialQuery stick around Refactor getMatchingItems() to ensure that hitMasks are cleared on all items if the query is cleared. Include the hitMasks in the key passed to _.memoize(). Tweak the options tooltip when new options are available. Remove Range.toValue(). commit ceeb63d1882f10470a19cdb31d3d3ef8c0b69b1d Author: John Dunning <[email protected]> Date: Sun Apr 19 18:30:51 2020 -0700 Add catch handler to startup promise chain commit 6f7936cb3e7e2cbdaff74c07f462c6aafae84e12 Author: John Dunning <[email protected]> Date: Sun Apr 12 19:03:08 2020 -0700 Tell babel to not convert Chinese characters to escape codes Tweak label of pinyin option. Don't rebuild the pinyin.js file for every grunt run. commit 7f89b61fc584bf70bd626b9b252db93412f293e1 Author: John Dunning <[email protected]> Date: Sat Apr 11 16:16:42 2020 -0700 Add usePinyin setting Pass the setting to scoreItems() and initItems(). Default usePinyin to true if Chinese characters are found in any open tab titles or URLs. Refactor quickey-storage.js to reduce the duplicated code. commit 3dcfd954d9f2f6a62e50012f9ebd5a6860d0ad13 Author: John Dunning <[email protected]> Date: Tue Apr 7 09:56:26 2020 -0700 Check that pinyin is a function after loading If the script didn't load, checking `&& pinyin` would've thrown an error. Reject a loadScript() error with an Error object. commit 0061f9385447c114a6dc02ee0126f5f7f3379cb6 Author: John Dunning <[email protected]> Date: Mon Apr 6 19:14:48 2020 -0700 Lazy-load the pinyin module Add load-script.js to lazy load pinyin, which is exported as a global var. It's ugly, but it avoids dealing with r.js getting confused by either trying to lazily require() it or using the import() command, which confuses esprima. Output pinyin.js into lib/ instead of common/. commit bdbede2e391a7671d603ffe74981b89e95658f3c Author: John Dunning <[email protected]> Date: Mon Apr 6 17:08:05 2020 -0700 Use import() to load pinyin on demand Works fine when running from source, but r.js and esprima choke on the import() keyword when building, so this still needs to get fixed. Don't include pinyin.js in the main.js bundle. Add grunt task to prepend the webpack output of pinyin with `export ` so it can imported with import(). Add optional heteronym param to pinyin(). commit a295be1ed9b0542b397c91ab1d05f7d4be83182d Author: John Dunning <[email protected]> Date: Sat Apr 4 18:34:56 2020 -0700 Fix webpack's AMD output Don't let webpack minify the library, as it wraps the output in parens, breaking r.js. Return heteronyms from pinyin(), separated with spaces. Store an empty string for pinyinTitle and pinyinDisplayURL if they match the original strings. Don't call score() if item[key] is falsey in scoreArray() and just store a 0 score. ES6ify array-score.js. Remove pinyin-cjs.js. commit 3071ccd2d52e0cdc288e622619cdbd7d7d9a1fdc Author: John Dunning <[email protected]> Date: Sat Apr 4 17:07:17 2020 -0700 Use webpack to build pinyin library Remove browserify, as webpack is much cleaner for building an AMD lib. Use normal AMD syntax to require pinyin lib in pinyin-amd.js. Build a minified version of the pinyin lib. Add build scripts to package.json. Add webpack and webpack-cli. Add grunt-shell to run package.json scripts. commit 4b6f648ea88d16c0bbeac080f5376a11079d4c2b Author: John Dunning <[email protected]> Date: Fri Apr 3 19:22:04 2020 -0700 Fix for pinyin build Wrap the browserified module in a shim with an IIFE that calls define() after the module runs, which seemed to be the only way to get it to work with r.js. commit 37807bc5cd904bc736aad1c735359f65b0adbe5b Author: John Dunning <[email protected]> Date: Sun Mar 29 18:00:42 2020 -0700 Support searching via pinyin Create PinyinQuickScoreArray() to use the pinyin fields when scoreItems() is called with a paramter. Wrap pinyin function to always use STYLE_NORMAL and collapse the array of results into a string. Add pinyinTitle and pinyinDisplayURL in initTabs(), based on a param. Add pinyinTitle and pinyinDisplayURL to the item tooltips in dev mode. Always browserify and clean rjs before other steps in grunt build. commit 531fd68802e2ff4b3cae2382c4358a3d3f13b35b Author: John Dunning <[email protected]> Date: Wed Mar 25 09:48:22 2020 -0700 Add pinyin library Use browserify to load the node module and then call define() to make it into an AMD module. Update to the latest packages. commit daa9e0b027572af9621b09873a7c18b8a36bf090 Author: John Dunning <[email protected]> Date: Sat Apr 18 13:39:53 2020 -0700 List all the tabs from closed windows, not just the first commit 19e0bc6328348b1e20a8917f6de47144d9a6c5d1 Author: John Dunning <[email protected]> Date: Tue Mar 31 10:17:23 2020 -0700 Update packages to remove vulnerabilities commit daeda2cb1dd3cd244ec00c74cf0de3b9485e5a88 Author: John Dunning <[email protected]> Date: Sun Mar 22 16:08:48 2020 -0700 Add support for media key shortcuts in Chrome Add symbols for media keys in key.js. Media key shortcuts aren't allowed to have modifiers in Chrome shortcuts, so special case them. Shorten edge-store-description.txt, since Edge only allows 10K chars. Tweak ctrl-tab/index.md.
- Loading branch information
1 parent
c499133
commit 181e00f
Showing
33 changed files
with
3,026 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
{ | ||
"generatorOpts": { | ||
"jsescOption": { | ||
"minimal": true | ||
} | ||
}, | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
define([ | ||
"pinyin" | ||
], ( | ||
originalPinyin | ||
) => { | ||
const {STYLE_NORMAL, compare} = originalPinyin; | ||
|
||
|
||
function pinyin( | ||
string, | ||
convertToString = true, | ||
heteronym = true) | ||
{ | ||
let result = originalPinyin(string, { style: STYLE_NORMAL, heteronym }); | ||
|
||
if (convertToString) { | ||
// if there are multiple transliterations for a character, | ||
// include all of them with spaces in between, and then join | ||
// everything into one string | ||
result = result.map((chars) => chars.join(" ")).join(" ") | ||
} | ||
|
||
return result; | ||
} | ||
|
||
|
||
pinyin.compare = compare; | ||
|
||
return pinyin; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// this is called within the browserify context, which has a local require() | ||
const originalPinyin = require("pinyin"); | ||
const {STYLE_NORMAL, compare} = originalPinyin; | ||
|
||
// this var is defined within the shim that gets wrapped around the output | ||
// of browserify, since calling define() in this file confused r.js for some | ||
// reason, so it couldn't find "lib/pinyin" | ||
pinyin = ( | ||
string, | ||
convertToString = true) => | ||
{ | ||
let result = originalPinyin(string, {style: STYLE_NORMAL}); | ||
|
||
if (convertToString) { | ||
// if there are multiple transliterations for a character, use | ||
// the first one and join all of them into one string | ||
result = result.map(([firstResult]) => firstResult).join(" ") | ||
} | ||
|
||
return result; | ||
}; | ||
|
||
pinyin.compare = compare; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.