Add: fixme comment about openEditor

This commit is contained in:
eight 2020-02-01 04:48:21 +08:00
parent 9c8cb9b928
commit fca1c13a8c

View File

@ -399,7 +399,6 @@ function onRuntimeMessage(msg, sender) {
return fn.apply(context, msg.args);
}
// FIXME: popup.js also open editor but it doesn't use this API.
function openEditor(params) {
const searchParams = new URLSearchParams(); // FIXME: use url.searchParams when Chrome >= 51
for (const key in params) {
@ -408,6 +407,7 @@ function openEditor(params) {
const search = searchParams.toString();
const url = chrome.runtime.getURL('edit.html') + (search && `?${search}`);
if (chrome.windows && prefs.get('openEditInWindow')) {
// FIXME: should we reuse the editor window?
chrome.windows.create(Object.assign({url}, prefs.get('windowPosition')));
} else {
openURL({url});