textbrowser 0.40.3 → 0.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGES.md +5 -0
- package/README.md +6 -3
- package/dist/index-es.js +24 -72
- package/dist/index-es.min.js +2 -2
- package/dist/index-umd.js +24 -72
- package/dist/index-umd.min.js +2 -2
- package/package.json +14 -15
- package/resources/index.js +4 -1
- package/resources/templates/workDisplay.js +7 -82
- package/resources/workDisplay.js +3 -1
- package/server/main-cjs.js +16 -70
package/dist/index-umd.js
CHANGED
|
@@ -16603,7 +16603,8 @@ Please refresh the page if you wish to reattempt.
|
|
|
16603
16603
|
localizeParamNames,
|
|
16604
16604
|
namespace,
|
|
16605
16605
|
hideFormattingSection,
|
|
16606
|
-
groups
|
|
16606
|
+
groups,
|
|
16607
|
+
preferencesPlugin
|
|
16607
16608
|
}) => ['div', {
|
|
16608
16609
|
style: {
|
|
16609
16610
|
textAlign: 'left'
|
|
@@ -16670,73 +16671,16 @@ Please refresh the page if you wish to reattempt.
|
|
|
16670
16671
|
}
|
|
16671
16672
|
|
|
16672
16673
|
return ['option', atts, [imfl(['languages', lan.code])]];
|
|
16673
|
-
})]]],
|
|
16674
|
-
|
|
16675
|
-
|
|
16676
|
-
|
|
16677
|
-
|
|
16678
|
-
|
|
16679
|
-
|
|
16680
|
-
|
|
16681
|
-
|
|
16682
|
-
|
|
16683
|
-
$DOCTYPE: {
|
|
16684
|
-
name: 'NETSCAPE-Bookmark-file-1'
|
|
16685
|
-
},
|
|
16686
|
-
title: l('Bookmarks'),
|
|
16687
|
-
body: [['h1', [l('Bookmarks_Menu')]], ...(await getFieldAliasOrNames()).flatMap(({
|
|
16688
|
-
groupName,
|
|
16689
|
-
worksToFields
|
|
16690
|
-
}) => {
|
|
16691
|
-
return [['dt', [['h3', {
|
|
16692
|
-
ADD_DATE,
|
|
16693
|
-
LAST_MODIFIED
|
|
16694
|
-
}, [groupName]]]], ['dl', [['p'], ...worksToFields.map(({
|
|
16695
|
-
fieldAliasOrNames,
|
|
16696
|
-
workName,
|
|
16697
|
-
shortcut: SHORTCUTURL
|
|
16698
|
-
}) => {
|
|
16699
|
-
// Todo (low): Add anchor, etc. (until handled by `work-startEnd`); &aqdas-anchor1-1=2&anchorfield1=Paragraph
|
|
16700
|
-
// Todo: option for additional browse field groups (startEnd2, etc.)
|
|
16701
|
-
// Todo: For link text, use `heading` or `alias` from metadata files in place of workName (requires loading all metadata files though)
|
|
16702
|
-
// Todo: Make Chrome NativeExt add-on to manipulate its search engines (to read a bookmarks file from Firefox properly, i.e., including keywords) https://www.makeuseof.com/answers/export-google-chrome-search-engines-address-bar/
|
|
16703
|
-
const paramsCopy = paramsSetter(_objectSpread2(_objectSpread2({}, getDataForSerializingParamsAsURL()), {}, {
|
|
16704
|
-
fieldAliasOrNames,
|
|
16705
|
-
workName: work,
|
|
16706
|
-
// Delete work of current page
|
|
16707
|
-
type: 'shortcutResult'
|
|
16708
|
-
}));
|
|
16709
|
-
const url = replaceHash(paramsCopy) + `&work=${workName}&${workName}-startEnd1=%s`; // %s will be escaped if set as param; also add changeable workName here
|
|
16710
|
-
|
|
16711
|
-
return ['dt', [['a', {
|
|
16712
|
-
href: url,
|
|
16713
|
-
ADD_DATE,
|
|
16714
|
-
LAST_MODIFIED,
|
|
16715
|
-
SHORTCUTURL
|
|
16716
|
-
}, [workName]]]];
|
|
16717
|
-
})]]];
|
|
16718
|
-
})]
|
|
16719
|
-
}
|
|
16720
|
-
})).replace( // Chrome has a quirk that requires this (and not
|
|
16721
|
-
// just any whitespace)
|
|
16722
|
-
// We're not getting the keywords with Chrome,
|
|
16723
|
-
// but at least usable for bookmarks (though
|
|
16724
|
-
// not the groups apparently)
|
|
16725
|
-
/<dt>/g, '\n<dt>')], {
|
|
16726
|
-
type: 'text/html'
|
|
16727
|
-
});
|
|
16728
|
-
const url = window.URL.createObjectURL(blob);
|
|
16729
|
-
const a = jml('a', {
|
|
16730
|
-
hidden: true,
|
|
16731
|
-
download: 'bookmarks.html',
|
|
16732
|
-
href: url
|
|
16733
|
-
}, $$1('#main'));
|
|
16734
|
-
a.click();
|
|
16735
|
-
URL.revokeObjectURL(url);
|
|
16736
|
-
}
|
|
16737
|
-
|
|
16738
|
-
}
|
|
16739
|
-
}, [l('Generate_bookmarks')]]]]]],
|
|
16674
|
+
})]]], preferencesPlugin ? preferencesPlugin({
|
|
16675
|
+
$: $$1,
|
|
16676
|
+
l,
|
|
16677
|
+
jml,
|
|
16678
|
+
paramsSetter,
|
|
16679
|
+
getDataForSerializingParamsAsURL,
|
|
16680
|
+
work,
|
|
16681
|
+
replaceHash,
|
|
16682
|
+
getFieldAliasOrNames
|
|
16683
|
+
}) : '']],
|
|
16740
16684
|
|
|
16741
16685
|
addBrowseFields({
|
|
16742
16686
|
browseFields,
|
|
@@ -16888,7 +16832,8 @@ Please refresh the page if you wish to reattempt.
|
|
|
16888
16832
|
preferredLocale,
|
|
16889
16833
|
schemaItems,
|
|
16890
16834
|
content,
|
|
16891
|
-
groups
|
|
16835
|
+
groups,
|
|
16836
|
+
preferencesPlugin
|
|
16892
16837
|
}) {
|
|
16893
16838
|
const work = $p.get('work');
|
|
16894
16839
|
|
|
@@ -16939,7 +16884,8 @@ Please refresh the page if you wish to reattempt.
|
|
|
16939
16884
|
localizeParamNames,
|
|
16940
16885
|
namespace,
|
|
16941
16886
|
groups,
|
|
16942
|
-
hideFormattingSection
|
|
16887
|
+
hideFormattingSection,
|
|
16888
|
+
preferencesPlugin
|
|
16943
16889
|
})]], ['h2', [heading]], ['br'], ['form', {
|
|
16944
16890
|
id: 'browse',
|
|
16945
16891
|
$custom: {
|
|
@@ -17946,6 +17892,9 @@ body {
|
|
|
17946
17892
|
fallbackLanguages,
|
|
17947
17893
|
$p
|
|
17948
17894
|
}) {
|
|
17895
|
+
const {
|
|
17896
|
+
preferencesPlugin
|
|
17897
|
+
} = this;
|
|
17949
17898
|
const langs = this.langData.languages;
|
|
17950
17899
|
const fallbackDirection = this.getDirectionForLanguageCode(fallbackLanguages[0]);
|
|
17951
17900
|
const prefI18n = localStorage.getItem(this.namespace + '-localizeParamNames');
|
|
@@ -18112,7 +18061,8 @@ body {
|
|
|
18112
18061
|
fieldMatchesLocale,
|
|
18113
18062
|
preferredLocale,
|
|
18114
18063
|
schemaItems,
|
|
18115
|
-
content
|
|
18064
|
+
content,
|
|
18065
|
+
preferencesPlugin
|
|
18116
18066
|
});
|
|
18117
18067
|
}
|
|
18118
18068
|
|
|
@@ -19494,6 +19444,7 @@ body {
|
|
|
19494
19444
|
this.requestPersistentStorage = options.requestPersistentStorage;
|
|
19495
19445
|
this.localizeParamNames = options.localizeParamNames === undefined ? true : options.localizeParamNames;
|
|
19496
19446
|
this.hideFormattingSection = Boolean(options.hideFormattingSection);
|
|
19447
|
+
this.preferencesPlugin = options.preferencesPlugin;
|
|
19497
19448
|
this.interlinearSeparator = options.interlinearSeparator; // Todo: Make these user facing options
|
|
19498
19449
|
|
|
19499
19450
|
this.showEmptyInterlinear = options.showEmptyInterlinear;
|
|
@@ -19865,7 +19816,8 @@ body {
|
|
|
19865
19816
|
fallbackLanguages,
|
|
19866
19817
|
languageParam,
|
|
19867
19818
|
$p,
|
|
19868
|
-
languages
|
|
19819
|
+
languages,
|
|
19820
|
+
preferencesPlugin: this.preferencesPlugin
|
|
19869
19821
|
});
|
|
19870
19822
|
return true;
|
|
19871
19823
|
}
|