poppen.de_MobileSearch

Show search for Poppen.de community on mobile Devices

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @id             poppen.de_MobileSearch
// @name           poppen.de_MobileSearch
// @namespace      de.poppen.search
// @version        0.6
// @author         Useless
// @description    Show search for Poppen.de community on mobile Devices
// @include        http*://*.poppen.de/community/forum/*
// @run-at         document-end
// @iconURL        https://www.poppen.de/favicon.ico
// @grant          GM_addStyle
// ==/UserScript==

(function() {
    var screenObj = window.screen;
    let esearch = document.getElementById('elSearchExpanded');
    let activity = document.getElementById('elNavSecondary_8');
    let newlink = document.createElement('a');
    var linkText = document.createTextNode("Erweiterte Suche");
    newlink.appendChild(linkText);
    newlink.title = "Erweiterte Suche";
    newlink.href = "/community/search";
    esearch.appendChild(newlink);
    if (screenObj.width <= 979)
    {
        let search = document.getElementById('elSearch');
        //let expsearch = document.getElementById('elSearchExpanded');
        let breadcrumb = document.getElementsByClassName('ipsBreadcrumb');
        let listItems = document.querySelectorAll('.ipsBreadcrumb li');
        for (let link of listItems) {
            link.style.display = 'none';
        }
        search.style.display = 'block'; // show
        activity.style.display = 'block';
        let menus = activity.querySelectorAll('li');
        for (let menu of menus) {
            menu.style.display = 'block';
        }
        let radios = search.querySelectorAll('li');
        for (let radio of radios) {
            radio.style.display = 'block';
        }
        esearch.style.right = "-50px";
        breadcrumb[0].style.display = 'block';
    }
})();