Code Duplication    Length = 23-23 lines in 2 locations

views/js/simulator.js 1 location

@@ 8-30 (lines=23) @@
5
* @copyright 2015-2016 Pagantis
6
* @license   proprietary
7
*/
8
function findPriceSelector()
9
{
10
    var priceDOM = document.getElementById("our_price_display");
11
    if (priceDOM != null) {
12
        return '#our_price_display';
13
    } else {
14
        priceDOM = document.querySelector(".current-price span[itemprop=price]")
15
        if (priceDOM != null) {
16
            return ".current-price span[itemprop=price]";
17
        }
18
    }
19
20
    return 'default';
21
}
22
23
function findQuantitySelector()
24
{
25
    var quantityDOM = document.getElementById("quantity_wanted");
26
    if (quantityDOM != null) {
27
        return '#quantity_wanted';
28
    }
29
    return 'default';
30
}

pagantis/views/js/simulator.js 1 location

@@ 8-30 (lines=23) @@
5
* @copyright 2015-2016 Pagantis
6
* @license   proprietary
7
*/
8
function findPriceSelector()
9
{
10
    var priceDOM = document.getElementById("our_price_display");
11
    if (priceDOM != null) {
12
        return '#our_price_display';
13
    } else {
14
        priceDOM = document.querySelector(".current-price span[itemprop=price]")
15
        if (priceDOM != null) {
16
            return ".current-price span[itemprop=price]";
17
        }
18
    }
19
20
    return 'default';
21
}
22
23
function findQuantitySelector()
24
{
25
    var quantityDOM = document.getElementById("quantity_wanted");
26
    if (quantityDOM != null) {
27
        return '#quantity_wanted';
28
    }
29
    return 'default';
30
}