Last active
August 29, 2015 14:02
-
-
Save higedice/93e32c6a980172ca9731 to your computer and use it in GitHub Desktop.
A Bookmarklet make with affiliate link from opening Yahoo! Auction (Japan) page.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* The Source of the Bookmarklet | |
*/ | |
(function (w) { | |
var affiliateID = "auct/p/DnvPkBwR6trLZQ9WVytq", | |
en = encodeURIComponent, | |
buildAffiliateURL = function (url, affID) { | |
return "http://atq.ck.valuecommerce.com/servlet/atq/referral?sid=2219441&pid=877510753&vcptn=" | |
+ en(affID) + "&vc_url=" + en(url); | |
}; | |
w.prompt ("YAuc", buildAffiliateURL(w.document.URL, affiliateID)); | |
})(window) | |
/* | |
* Bookmarklet code | |
* | |
javascript:(function(a){var d="auct/p/DnvPkBwR6trLZQ9WVytq",b=encodeURIComponent,c=function(f,e){return"http://atq.ck.valuecommerce.com/servlet/atq/referral?sid=2219441&pid=877510753&vcptn="+b(e)+"&vc_url="+b(f)};a.prompt("YAuc",c(a.document.URL,d))})(window); | |
*/ | |
/* | |
# Makefile | |
COMPRESSOR = java -jar yuicompressor-2.4.7.jar | |
ENCODER = sed -e 's/%/%25/g' | \ | |
sed -e 's/ /%20/g' | \ | |
sed -e 's/^/javascript:/' | |
MakeYahooAuctionAffiliateLink_Bookmarklet-min.js: MakeYahooAuctionAffiliateLink_Bookmarklet.js | |
$(COMPRESSOR) MakeYahooAuctionAffiliateLink_Bookmarklet.js -v | $(ENCODER) >MakeYahooAuctionAffiliateLink_Bookmarklet-min.js | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment