diff --git a/css/components/RuntimeListUpdates.css b/css/components/RuntimeListUpdates.css new file mode 100644 index 0000000..6dd4353 --- /dev/null +++ b/css/components/RuntimeListUpdates.css @@ -0,0 +1,9 @@ +[data-component="RuntimeListUpdates"] { + display: flex; + flex-direction: column; + align-items: flex-end; +} +[data-component="RuntimeListUpdates"] > span { + font-size: 0.9em; + opacity: 0.7; +} diff --git a/defaults.js b/defaults.js index e88e45f..1917a65 100644 --- a/defaults.js +++ b/defaults.js @@ -30,7 +30,12 @@ export default function () { isRedirectDisabled: false, disabledWikis: [], + + // Developer settings - subject to change useTabRedirect: !supportsDNR(), + useRuntimeLists: false, + rtListLastSyncTime: 0, + ffUseOptimisedSearchCore: false, // Legacy search engine settings - this should be migrated and dropped in 1.7.0 searchMode: 'rewrite', diff --git a/js/popup.js b/js/popup.js index b5ddc64..4829eca 100644 --- a/js/popup.js +++ b/js/popup.js @@ -4,6 +4,7 @@ import { } from './util.js'; import SearchFilterSettings from './popup/SearchFilterSettings.js'; import WikiList from './popup/WikiList.js'; +import RuntimeListUpdates from './popup/RuntimeListUpdates.js'; import * as DeclarativeSettings from './popup/DeclarativeSettings.js'; @@ -74,7 +75,8 @@ const RTW = { initialiseComponents() { const registry = { SearchFilterSettings, - WikiList + WikiList, + RuntimeListUpdates, }; for ( const element of document.querySelectorAll( '[data-component]' ) ) { const compId = element.getAttribute( 'data-component' ); diff --git a/js/popup/RuntimeListUpdates.js b/js/popup/RuntimeListUpdates.js new file mode 100644 index 0000000..d14750e --- /dev/null +++ b/js/popup/RuntimeListUpdates.js @@ -0,0 +1,18 @@ +import { + createDomElement, + getMessage +} from "../util.js"; + + +export default class RuntimeListUpdates { + static initialise( container ) { + createDomElement( 'button', { + text: '[PH]Update now', + appendTo: container, + } ); + createDomElement( 'span', { + text: 'Last updated: 99 seconds ago', + appendTo: container, + } ); + } +} diff --git a/popup.html b/popup.html index 5bca706..32df8f6 100644 --- a/popup.html +++ b/popup.html @@ -8,6 +8,7 @@ +
@@ -71,6 +72,25 @@
Hidden options
data-off="false" />
+
+ + +
+
+ + +
+
+ +