// ==UserScript==
// @name          amazon_wishlist_sum
// @namespace     danibaena
// @description   Just a simple script to sum all items and prices in an Amazon.es' Wishlist url
// @include       http://www.amazon.es/gp/registry/wishlist/*
// @require       http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @grant         none
// ==/UserScript==

var divId = "g-items-btf";
var productsList = document.getElementById(divId);
var priceClass = "a-size-base a-color-price a-text-bold";
var itemPrices = document.getElementsByClassName(priceClass);
var itemSum = 0;
var itemCounter = 0;
var itemNotAvailableCounter = 0;

for (i=0; i<itemPrices.length; i++){
	var str = itemPrices[i].innerHTML.trim();
	if((str !== 'No disponible') && ( str !== '') ){
			var res = str.replace("EUR", "");
			res = res.trim();
			res = res.replace(".","");
			res = res.replace(",",".");
			res = parseFloat(res);
			itemSum+=res;
			itemCounter++;
		} else {
			itemNotAvailableCounter++;
		}
}
itemSum = itemSum.toFixed(2);
itemSumCoinc = (itemSum/1.04).toFixed(2);
itemSumCoinc = itemSumCoinc.toString().replace(".",",").replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1.");
itemSum = itemSum.toString().replace(".",",").replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1.");

var scriptList = document.createElement("div");
scriptList.setAttribute("class", priceClass);
scriptList.setAttribute("id", "scriptList");
productsList.appendChild(scriptList);

var list = document.getElementById("scriptList");
list.style.float = 'right';
list.style.border = '1px solid #DDD';
list.style.padding = '14px 18px';
list.style.textAlign = 'right';

var paginationID = "wishlistPagination"
var pages = document.getElementById(paginationID);
var page;


if(pages !== null){
	page = "Datos para esta página de la lista:<br>";
} else {
	page = "Datos de la lista:<br>";
}
list.innerHTML = page +
				 "Artículos totales: "        + itemCounter             + "<br>" +
				 "Artículos no disponibles: " + itemNotAvailableCounter + "<br>" +
				 "Coste total: "              + itemSum                 + " EUR<br>" +
				 "Coste total con COINC: "    + itemSumCoinc            + " EUR";
@@ -236,16 +236,79 @@
 hlist/*%0A
+// @include       https://www.amazon.es/gp/registry/wishlist/*%0A
 // @requ
@@ -1555,22 +1555,61 @@
 yle.
-float = 'right
+display = 'flex';%0Alist.style.justifyContent = 'center
 ';%0Al
@@ -1624,16 +1624,19 @@
 e.border
+Top
  = '1px 
@@ -1670,19 +1670,17 @@
 ding
+Top
  = '
-14px 18
+22
 px';
@@ -1708,13 +1708,14 @@
  = '
-right
+center
 ';%0A%0A
@@ -1753,16 +1753,17 @@
 ination%22
+;
 %0Avar pag
@@ -1838,17 +1838,20 @@
  null)%7B%0A
-%09
+    
 page = %22
@@ -1901,17 +1901,20 @@
  else %7B%0A
-%09
+    
 page = %22
@@ -1964,20 +1964,24 @@
  page +%0A
-%09%09%09%09
+        
  %22Art%C3%ADcu
@@ -2039,20 +2039,24 @@
 %3Cbr%3E%22 +%0A
-%09%09%09%09
+        
  %22Art%C3%ADcu
@@ -2106,36 +2106,40 @@
 nter + %22%3Cbr%3E%22 +%0A
-%09%09%09%09
+        
  %22Coste total: %22
@@ -2197,12 +2197,16 @@
 %22 +%0A
-%09%09%09%09
+        
  %22Co

Fix bug with https in wishlist script