From d60492f7261d6af7f7f89b50b9fe669ac626e131 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Fri, 5 Jun 2015 11:46:51 +0200 Subject: version bump --- js/gui/Fixes.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 js/gui/Fixes.js (limited to 'js/gui/Fixes.js') 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 + * @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 -- cgit v1.2.3