Old: v24.05.19 - 2024-05-19 - Add option to set default amount of maximum amount of entries
New: v24.05.21 - 2024-05-21 - Improve handling of displaying all available items
- @@ -16,7 +16,7 @@
- // @exclude *&streamburner_active=0
- // @match file:///*
- // @match *://*/*
-// @version 24.05.19
- +// @version 24.05.21
- // @run-at document-start
- // @grant GM.setValue
- // @grant GM.getValue
- @@ -737,6 +737,7 @@
- </div>
- <div class="category" id="events">
- <h3>Conferences & Events</h3>
- + <a href="https://mov.im/feed/pubsub.movim.eu/berlin-xmpp-meetup">Berlin XMPP Meetup</a>
- <a href="https://bsd.network/@bsdcan.rss">BSDCan</a>
- <a href="https://about.cocalc.com/feed/">CoCalc</a>
- <a href="https://datacarpentry.org/feed">Data Carpentry</a>
- @@ -3601,7 +3602,7 @@
- z-index: 1;
- /* border-radius: unset; */
- /* border-bottom: unset; */
- max-height: 44.5px; /* TODO FIXME links-bar */ }
- + /* max-height: 44.5px; */ /* TODO FIXME links-bar */ }
-
- #links-bar::-webkit-scrollbar { /* Falkon and Otter */
- display: none; }
- @@ -4606,9 +4607,13 @@
- margin-left: 40px;
- margin-right: auto; }`;
-
-var cssFileBase, minimumItemNumber, xmlStylesheet = false;
- +var cssFileBase, ignoreMinimumItemNumber = false, minimumItemNumber, xmlStylesheet = false;
-
-(function checkContentType() {
- +init = (function init() {
- + checkContentType()
- +})();
- +
- +function checkContentType() {
- let myPromise = new Promise(function(myResolve, myReject) {
- let request = new XMLHttpRequest();
- //request.overrideMimeType('text/plain');
- @@ -4921,7 +4926,7 @@
- }
- }
- );
-})();
- +}
-
- /*
-
- @@ -5103,15 +5108,13 @@
- if (
- index > minimumItemNumber &&
- index < items &&
- !document.location.search.includes('streamburner_show=all')
- + !ignoreMinimumItemNumber
- )
- {
- let titleToc = newDocument.createElement('a');
- titleToc.textContent = `See all news >`;
- titleToc.title = `This feed offers ${items} items`;
- listAll = new URL(document.location.href);
- listAll.searchParams.set('streamburner_show', 'all');
- titleToc.href = listAll.href;
- + titleToc.className = 'expand';
- toc.append(titleToc);
- articles.append(titleToc.cloneNode(true));
- break;
- @@ -5242,15 +5245,13 @@
- if (
- index > minimumItemNumber &&
- index < items &&
- !document.location.search.includes('streamburner_show=all')
- + !ignoreMinimumItemNumber
- )
- {
- let titleToc = newDocument.createElement('a');
- titleToc.textContent = `See all news >`;
- titleToc.title = `This feed offers ${items} items`;
- listAll = new URL(document.location.href);
- listAll.searchParams.set('streamburner_show', 'all');
- titleToc.href = listAll.href;
- + titleToc.className = 'expand';
- toc.append(titleToc);
- articles.append(titleToc.cloneNode(true));
- break;
- @@ -5461,15 +5462,13 @@
- if (
- index > minimumItemNumber &&
- index < items &&
- !document.location.search.includes('streamburner_show=all')
- + !ignoreMinimumItemNumber
- )
- {
- let titleToc = newDocument.createElement('a');
- titleToc.textContent = `See all news >`;
- titleToc.title = `This feed offers ${items} items`;
- listAll = new URL(document.location.href);
- listAll.searchParams.set('streamburner_show', 'all');
- titleToc.href = listAll.href;
- + titleToc.className = 'expand';
- toc.append(titleToc);
- articles.append(titleToc.cloneNode(true));
- break;
- @@ -5846,18 +5845,13 @@
- if (
- index > minimumItemNumber &&
- index < items &&
- // FIXME Ineffective at https://typo3.org/rss due to server-side redirect
- //new URL(document.location).searchParams.get('streamburner_show') == 'all'
- //!document.location.href.includes('streamburner_show=all')
- !document.location.search.includes('streamburner_show=all')
- + !ignoreMinimumItemNumber
- )
- {
- let titleToc = newDocument.createElement('a');
- titleToc.textContent = `See all news >`;
- titleToc.title = `This feed offers ${items} items`;
- listAll = new URL(document.location.href);
- listAll.searchParams.set('streamburner_show', 'all');
- titleToc.href = listAll.href;
- + titleToc.className = 'expand';
- toc.append(titleToc);
- articles.append(titleToc.cloneNode(true));
- break;
- @@ -6082,15 +6076,13 @@
- if (
- index > minimumItemNumber &&
- index < items &&
- !document.location.search.includes('streamburner_show=all')
- + !ignoreMinimumItemNumber
- )
- {
- let titleToc = newDocument.createElement('a');
- titleToc.textContent = `See all news >`;
- titleToc.title = `This feed offers ${items} items`; // NOTE Miscount
- listAll = new URL(document.location.href);
- listAll.searchParams.set('streamburner_show', 'all');
- titleToc.href = listAll.href;
- + titleToc.className = 'expand';
- toc.append(titleToc);
- articles.append(titleToc.cloneNode(true));
- break;
- @@ -6628,6 +6620,14 @@
- window.scrollTo({ top: 0 });
- };
-
- + for (let titleToc of document.querySelectorAll('.expand')) {
- + titleToc.onclick = () => {
- + ignoreMinimumItemNumber = true;
- + checkContentType();
- + init;
- + };
- + }
- +
- //function scrollDown(document) {
- let urlA;
- // Create toolbar and a button when scrolling down