File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 19
19
20
20
try { //Try eBay
21
21
let address = document . querySelector ( "#shipToAddress" ) . innerText ;
22
- let shipping = document . querySelectorAll ( ".BuyerPurchaseDetails--1nhS6" ) [ 3 ] . children [ 1 ] . innerText ;
22
+ let shipping = document . querySelectorAll ( ".BuyerPurchaseDetails--1nhS6" ) [ 3 ] . children [ 1 ] . innerText ;
23
23
shipping = parseFloat ( shipping . substring ( shipping . indexOf ( "$" ) + 1 ) ) ; //Shipping as a float
24
24
let grandTotal = document . querySelectorAll ( ".BuyerPurchaseDetails--1nhS6" ) [ 2 ] . children [ 1 ] . innerText ; //Shipping+items+tax
25
25
grandTotal = parseFloat ( grandTotal . substring ( grandTotal . indexOf ( "$" ) + 1 ) ) ;
28
28
let item_arr = [ ] ;
29
29
for ( let i = 0 ; i < items . length ; i ++ ) { //Iterate through the items
30
30
let itm = items [ i ] . children [ 1 ] ;
31
- let price = itm . children [ 2 ] . innerText ;
32
- itemTotal += parseFloat ( price . substring ( price . indexOf ( "$" ) + 1 ) ) ;
31
+ let price = itm . children [ 3 ] . innerText ;
32
+ price = parseFloat ( price . substring ( price . indexOf ( "$" ) + 1 ) ) ;
33
+ itemTotal += price ;
33
34
item_arr . push ( {
34
35
desc : itm . children [ 0 ] . innerText ,
35
- sku : "I" ,
36
- qty : itm . children [ 1 ] . innerText . slice ( 5 ) ,
36
+ sku : itm . children [ 1 ] . innerText . slice ( 5 ) ,
37
+ qty : itm . children [ 2 ] . innerText . slice ( 5 ) ,
37
38
price : price
38
39
} ) ;
39
40
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"manifest_version" : 2 ,
3
3
"name" : " PrinterPi" ,
4
- "version" : " 6.0 " ,
4
+ "version" : " 6.1 " ,
5
5
"description" : " Parse eBay Print Shipping Label or PayPal Activity pages and send the data to an application that controls a receipt printer" ,
6
6
7
7
"options_page" : " options.html" ,
You can’t perform that action at this time.
0 commit comments