diff options
Diffstat (limited to 'js/gui')
-rw-r--r-- | js/gui/Fixes.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/js/gui/Fixes.js b/js/gui/Fixes.js new file mode 100644 index 000000000..722b1a710 --- /dev/null +++ b/js/gui/Fixes.js @@ -0,0 +1,26 @@ +/** + * ownCloud - News + * + * This file is licensed under the Affero General Public License version 3 or + * later. See the COPYING file. + * + * @author Bernhard Posselt <dev@bernhard-posselt.com> + * @copyright Bernhard Posselt 2014 + */ + +/** + * This prefills the add feed section if an external link has ?subsribe_to + * filled out + */ +(function (window, document) { + 'use strict'; + + // If F5 is used to reload the page in Firefox, the content will sometimes + // be scrolled back to the position where it was before the reload which + // will cause new articles being marked as read + window.addEventListener('beforeunload', function () { + var content = document.querySelector('#app-content'); + content.scrollTo(0, 0); + }); + +})(window, document);
\ No newline at end of file |