ttrss/js/tt-rss.js

83 lines
1.8 KiB
JavaScript
Raw Normal View History

'use strict'
2021-02-19 04:29:21 +00:00
/* global require, App, dojo */
/* exported Plugins */
const Plugins = {};
require(["dojo/_base/kernel",
"dojo/_base/declare",
"dojo/ready",
"dojo/parser",
"fox/App",
"dojo/_base/loader",
"dojo/_base/html",
"dojo/query",
"dijit/ProgressBar",
"dijit/ColorPalette",
"dijit/Dialog",
"dijit/form/Button",
"dijit/form/ComboButton",
"dijit/form/CheckBox",
"dijit/form/DropDownButton",
"dijit/form/FilteringSelect",
"dijit/form/Form",
"dijit/form/RadioButton",
"dijit/form/Select",
"dijit/form/MultiSelect",
"dijit/form/SimpleTextarea",
"dijit/form/TextBox",
"dijit/form/ComboBox",
"dijit/form/ValidationTextBox",
"dijit/InlineEditBox",
"dijit/layout/AccordionContainer",
"dijit/layout/BorderContainer",
"dijit/layout/ContentPane",
"dijit/layout/TabContainer",
"dijit/PopupMenuItem",
"dijit/Menu",
"dijit/Toolbar",
"dijit/Tree",
"dijit/tree/dndSource",
"dijit/tree/ForestStoreModel",
"dojo/data/ItemFileWriteStore",
"fox/PluginHost",
"fox/CommonFilters",
"fox/CommonDialogs",
"fox/Feeds",
"fox/Headlines",
"fox/Article",
"fox/FeedStoreModel",
"fox/FeedTree",
"fox/Toolbar",
"fox/SingleUseDialog",
2020-02-28 11:04:29 +00:00
"fox/form/ValidationTextArea",
"fox/form/Select",
"fox/form/ComboButton",
"fox/form/DropDownButton"], function (dojo, declare, ready, parser) {
ready(function () {
try {
App.init(parser, false);
} catch (e) {
if (typeof App != "undefined" && App.Error)
App.Error.report(e);
else
alert(e + "\n\n" + e.stack);
}
});
});
/* exported hash_get */
function hash_get(key) {
2021-02-19 03:35:37 +00:00
const obj = dojo.queryToObject(window.location.hash.substring(1));
return obj[key];
}
/* exported hash_set */
function hash_set(key, value) {
2021-02-19 03:35:37 +00:00
const obj = dojo.queryToObject(window.location.hash.substring(1));
obj[key] = value;
window.location.hash = dojo.objectToQuery(obj);
}