Price Variation

Embeds CamelCamelCamel price chart in Amazon

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name        Price Variation
// @namespace   PriceVariation
// @description Embeds CamelCamelCamel price chart in Amazon
// @include        http://www.amazon.*/*
// @include        https://www.amazon.*/*
// @version     20160613
// @grant       none
// @require        http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js
// ==/UserScript==

var width=500;
var height = 200;
var duration = "1y";

$(document).ready(function () {
	var element = $(':input[name="ASIN"]');
        var arr = document.domain.split(".");
        var country = arr[arr.length - 1];
		if (country == "com") { var country = "us"; }
	if (element) {
		var asin = $.trim(element.attr("value"));
		var link = "<a  target='blank' href='http://"+country+".camelcamelcamel.com/product/" + asin + "'><img src='http://charts.camelcamelcamel.com/"+country+"/" + asin + "/amazon.png?force=1&zero=0&w="+width+"&h="+height+"&desired=false&legend=1&ilt=1&tp=" + duration + "&fo=0' /></a>";
		$("#availability").append("<div id='camelcamelcamel' style='margin-top: 0px; margin-left: 0px'>" + link + "</div>");
	}
});