MarktEnhancer

Usability fixes

Verze ze dne 14. 04. 2020. Zobrazit nejnovější verzi.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         MarktEnhancer
// @namespace https://greasyfork.org/users/290665
// @version      1.0
// @description  Usability fixes
// @match        https://*.markt.de/*
// @grant    GM_addStyle
// @grant    GM_download
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js
// ==/UserScript==

addStyle();
var myVersion = GM_info.script.version;

$(function() {
    var phone = "";
    $('.markt_expose_attrPhone_char').each(function(i,el) {
        var number = "";
        number += $(el).text();
        number += window.getComputedStyle(el,':before').content;
        console.log('number: ['+number+']');
        if (number.length) {
            number = number.replace(/none/,' ');
            number = number.replace(/ +/,' ');
            number = number.replace(/[^0-9\-+ ]+/g,'');
            phone += number;
        }
    });
    if (phone.length) {
        phone = phone.replace(/\+ +/,'+');
        var url = phone.replace(/[ -]+/g,'');
        var search = phone.replace(/ +/g,'%20');
        $('#markt_expose_attrPhone').html('<a href="tel:'+url+'">'+phone+'</a> [<a href="https://www.google.com/search?q='+search+'" target="_new">google</a>]');
    }
});


function addStyle() {
    GM_addStyle(`

`);
}