Total Complexity | 5 |
Complexity/F | 2.5 |
Lines of Code | 21 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | /** |
||
8 | function findPriceSelector() { |
||
9 | var priceDOM = document.getElementById("our_price_display"); |
||
10 | if (priceDOM != null) { |
||
|
|||
11 | return '#our_price_display'; |
||
12 | } else { |
||
13 | priceDOM = document.querySelector(".current-price span[itemprop=price]") |
||
14 | if (priceDOM != null) { |
||
15 | return ".current-price span[itemprop=price]"; |
||
16 | } |
||
17 | } |
||
18 | |||
19 | return 'default'; |
||
20 | } |
||
21 | |||
22 | function findQuantitySelector() { |
||
23 | var quantityDOM = document.getElementById("quantity_wanted"); |
||
24 | if (quantityDOM != null) { |
||
25 | return '#quantity_wanted'; |
||
26 | } |
||
27 | return 'default'; |
||
28 | } |