MarktEnhancer

Usability fixes

Από την 14/04/2020. Δείτε την τελευταία έκδοση.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==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(`

`);
}