diff --git a/NEWS.md b/NEWS.md index 44a66a7775..48391639e7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -116,6 +116,7 @@ - Search button is now always on the screen, avoiding the need to scroll to top to be able to use it. ([#1231](https://github.com/fossar/selfoss/issues/1231)) - Button for opening articles, tags, sources and filters in the sidebar, as well as the source and tag links in articles are now real links, allowing to open them in a new tab by middle-clicking them. ([#1216](https://github.com/fossar/selfoss/issues/1216), [#695](https://github.com/fossar/selfoss/issues/695)) - Configuration is no longer managed by F3 framework. ([#1261](https://github.com/fossar/selfoss/pull/1261)) +- Removed `anonymizer` configuration option. ([#1358](https://github.com/fossar/selfoss/pull/1358)) ## 2.18 – 2018-03-05 diff --git a/assets/js/selfoss-base.js b/assets/js/selfoss-base.js index a9cf767be4..b0d14e0e61 100644 --- a/assets/js/selfoss-base.js +++ b/assets/js/selfoss-base.js @@ -381,24 +381,6 @@ var selfoss = { }, - /** - * anonymize links - * - * @return void - * @param parent element - */ - anonymize: function(parent) { - var anonymizer = selfoss.config.anonymizer; - if (anonymizer !== null) { - parent.querySelectorAll('a').forEach((link) => { - if (typeof link.getAttribute('href') !== 'undefined' && !link.getAttribute('href').startsWith(anonymizer)) { - link.setAttribute('href', anonymizer + link.getAttribute('href')); - } - }); - } - }, - - /** * Setup fancyBox image viewer * @param content element diff --git a/assets/js/templates/Item.jsx b/assets/js/templates/Item.jsx index a26b0401b3..71268851f9 100644 --- a/assets/js/templates/Item.jsx +++ b/assets/js/templates/Item.jsx @@ -11,10 +11,6 @@ import { forceReload, makeEntriesLink, makeEntriesLinkLocation } from '../helper import * as icons from '../icons'; import { LocalizationContext } from '../helpers/i18n'; -function anonymize(url) { - return (selfoss.config.anonymizer ?? '') + url; -} - function stopPropagation(event) { event.stopPropagation(); } @@ -294,11 +290,6 @@ export default function Item({ currentTime, item, selected, expanded, setNavExpa }); } } - - if (firstExpansion) { - // anonymize - selfoss.anonymize(contentBlock.current); - } } else { // No longer expanded. @@ -392,7 +383,7 @@ export default function Item({ currentTime, item, selected, expanded, setNavExpa {/* icon */} 0 ?
- + {item.strippedTitle}
@@ -485,7 +476,7 @@ export default function Item({ currentTime, item, selected, expanded, setNavExpa