Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Login problem workaround (arcor/freenet)
- // @namespace boardraider@firefox-browser.de
- // @description Removes fake password input fields
- // @version 0.1
- // @date 2009-02-12
- // @copyright 2009, boardraider
- // @license GPL 2 or later
- // @include http://www.arcor.de/index.html
- // @include https://www.arcor.de/login/login.jsp?*
- // @include http://www.freenet.de/freenet/
- // ==/UserScript==
- //
- // -----------------------------------------------------------------------------
- //
- // This program is free software; you can redistribute it and/or modify
- // it under the terms of the GNU General Public License as published by
- // the Free Software Foundation; either version 2 of the License, or
- // (at your option) any later version.
- //
- // This program is distributed in the hope that it will be useful,
- // but WITHOUT ANY WARRANTY; without even the implied warranty of
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- // GNU General Public License for more details.
- //
- // You should have received a copy of the GNU General Public License
- // along with this program. If not, see <http://www.gnu.org/licenses/>.
- //
- // -----------------------------------------------------------------------------
- (function () {
- var href = window.location.href;
- var formName, fakeValue;
- if (href == "http://www.arcor.de/index.html"||
- href.indexOf("https://www.arcor.de/login/login.jsp?") == 0) {
- formName = "login";
- fakeValue = "Online-Passwort";
- }
- if (href == "http://www.freenet.de/freenet/") {
- formName = "loginform";
- fakeValue = "Passwort";
- }
- var passInput = document.evaluate("//form[@name = '" + formName + "']" +
- "//input[@type = 'password']", document, null,
- XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
- passInput.style.display = "block";
- var fakeInput = document.evaluate("//form[@name = '" + formName + "']" +
- "//input[@value = '" + fakeValue + "']", document, null,
- XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue
- passInput.parentNode.removeChild(fakeInput);
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement