Amazon Source Code leaked?
I do not know..I am not that much of a programmer to know that. But sometime back, there was a post on Techcrunch that Facebook's source code was leaked.
Today I was browsing for a few books on Amazon and got similar things. I was looking for two books in fact. While one looked like just HTML, the other had a lot of PHP code. So, I thought let me also publish it.
--------------------------------------------------------------------------
Sponsor Ads: Check out Feedrer - Internet's first Social feed Network
INVITATION CODE: INVITEME
-------------------------------------------------------------------------
Amazon Page 1:
// behavior.js - by Dave Herman // Copyright (C) 2005 by Dave Herman // function HandlerSet() { this.clearHandlers(); } HandlerSet.prototype = { addHandler : function(f, key) { key = key || this.uniqueID++; this.installedHandlers[key] = f; return key; }, removeHandler : function(key) { delete this.installedHandlers[key]; }, clearHandlers : function() { this.installedHandlers = { }; this.uniqueID = 0; }, replaceHandlers : function(f, key) { clearHandlers(); return addHandler(f, key); }, applyAll : function(object, arguments) { for (var handler in this.installedHandlers) { this.installedHandlers[handler].apply(object, arguments); } }, debug : function() { var str = ""; for (var p in this.installedHandlers) { str += p + " => " + this.installedHandlers[p] + "\n"; } alert(str); } }; // ============================================================================= // Function Class: EventHandler // ============================================================================= function isEventHandler(x) { return (typeof x == 'function' && x.handlers && x.handlers.constructor == HandlerSet); } function makeEventHandler(original) { var handlers = new HandlerSet(); if (typeof original == 'function') { handlers.addHandler(original); } // The event handler is a function, so it can be used with the DOM. // But when its called, we apply all the handlers in the set. var result = function() { handlers.applyAll(this, arguments); }; // We also expose its handler set so we can get at it later. result.handlers = handlers; return result; } // ============================================================================= // Module: Behavior // ============================================================================= var Behavior = { registry : new Array, register : function(sheet) { Behavior.registry.push(sheet); }, registerEventHandlers : function(element, handlers) { for (var event in handlers) { if (!isEventHandler(element[event])) { element[event] = makeEventHandler(element[event]); } element[event].handlers.addHandler(handlers[event]); } }, apply : function() { for (var i = 0; i < sheet =" Behavior.registry[i];" list =" document.getElementsBySelector(selector);" j =" 0;" oldhandler =" window.onload;" onload =" handler;" onload =" function()" getelementsbyselector =" function(selector)" tokens =" selector.split('" currentcontext =" new" i =" 0;" token =" tokens[i].replace(/^\s+/,'').replace(/\s+$/,'');;"> -1) { // Token is an ID selector var bits = token.split('#'); var tagName = bits[0]; var id = bits[1]; var element = document.getElementById(id); if (tagName && element.nodeName.toLowerCase() != tagName) { // tag with that ID not found, return false return new Array(); } // Set currentContext to contain just this element currentContext = new Array(element); continue; // Skip to next token } if (token.indexOf('.') > -1) { // Token contains a class selector var bits = token.split('.'); var tagName = bits[0]; var className = bits[1]; if (!tagName) { tagName = '*'; } // Get elements matching tag, filter them for class selector var found = new Array; var foundCount = 0; for (var h = 0; h < tagname ="=" elements =" getAllChildren(currentContext[h]);" elements =" currentContext[h].getElementsByTagName(tagName);" j =" 0;" currentcontext =" new" currentcontextindex =" 0;" k =" 0;" tagname =" RegExp.$1;" attrname =" RegExp.$2;" attroperator =" RegExp.$3;" attrvalue =" RegExp.$4;" tagname =" '*';" found =" new" foundcount =" 0;" h =" 0;" tagname ="=" elements =" getAllChildren(currentContext[h]);" elements =" currentContext[h].getElementsByTagName(tagName);" j =" 0;" currentcontext =" new" currentcontextindex =" 0;" checkfunction =" function(e)" checkfunction =" function(e)" checkfunction =" function(e)" checkfunction =" function(e)" checkfunction =" function(e)" checkfunction =" function(e)"> -1); }; break; default : // Just test for existence of attribute checkFunction = function(e) { return e.getAttribute(attrName); }; } currentContext = new Array; var currentContextIndex = 0; for (var k = 0; k < tagname =" token;" found =" new" foundcount =" 0;" h =" 0;" elements =" currentContext[h].getElementsByTagName(tagName);" j =" 0;" currentcontext =" found;" doubleclickprevention_submitted =" false;" clickonce =" {">
Amazon Page 2
hr { margin-left: 0px; } a.buyAction { font-weight: bold; } h2 { color: #CC6600; font-size: medium; margin: 0px 0px 0.25em; } .bucket h3 { color: #000; font-size: 1em; font-weight: bold; margin: 0px 0px 0.25em 0px; } table.productImageGrid { float:left; margin: 0px 15px 15px 0px; background-color: #FFFFFF; text-align: center; background-image: url(http://ec1.images-amazon.com/images/G/01/icons/white1px._V46769925_.jpg); } table.buyingDetailsGrid { float:right; margin: 0px 0px 15px 15px; background-color: #FFFFFF; } .price { font-family: verdana,arial,helvetica,sans-serif; } div.extendedBuyBox { padding: 4px 0px; } hr.EBBdivider { margin: 0px; } div.buying { padding: 0.25em 0em; font-size: .86em; } #asinRedirect, #firstDimension { font-size: .95em; width: 215px; } div.buying table { font-size: small; } div.buying table td { font-size: .86em; } div.buying table td.tiny { font-size: x-small; } .buying .subTitle { font-size: x-small; line-height: 1.45em; margin: .5em 0; } #priceBlock, #priceBlock table td, #primaryUsedAndNew, #primaryClubPrice, #secondaryUsedAndNew, #secondaryClubPrice, #adultWarning, #violenceWarning { font-size: small; } #primaryUsedAndNew { padding: 1em 0em; } #newAmazonShorts table { font-size: small; } #newAmazonShorts table td.promo { font-size: .86em; } #newAmazonShorts .price { font-size: .86em; } #specialContent br, #specialContent img { display: none; } #specialOffers { font-size: .86em; } #specialOffers table { font-size: small; } #specialOffers table td.promo { font-size: .86em; padding: .25em 0em; } #specialOffers table td.small { font-size: .86em; } #specialOffers font { font-size: .86em; } #promoGrid img { display: none; } #promoGrid .amabot_widget img { display: none; } #promoGrid .flashPlayer { clear: left; } .quickPromo br, .quickPromo img { display: none; } .quickPromo .flashPlayer { clear: left; } .quickPromo ul li { margin: 0.25em 0em; } .halfspace { padding-top: 0.5em; } #a9message hr { display: none; } #a9message { padding-top: 6px; width: 190px; } hr.bucketDivider { clear: left; } div.bucket { padding: 5px 0em; } td.bucket { padding: 5px 0em; } td.bucket div.content { margin: 0.5em 0px 0em 25px; } div.content form { margin: 0px; } div.endcap div.content { text-align: center; } table.endcapGrid { padding: 1.5em 0em 0.25em; } #bookCitations img { display: none; } div.looseDiamondBox { clear: both; } table.buyBox td.topLeft { background-image: url(http://ec1.images-amazon.com/images/G/01/nav2/dp/box-tl._V23911150_.gif); background-repeat: no-repeat; padding-top: 12px; padding-left: 12px; } table.buyBox td.topRight { background-image: url(http://ec1.images-amazon.com/images/G/01/nav2/dp/box-tr._V23911145_.gif); background-repeat: no-repeat; } table.buyBox td.bottomLeft { background-image: url(http://ec1.images-amazon.com/images/G/01/nav2/dp/box-bl._V23911151_.gif); background-repeat: no-repeat; font-size: 4px; } table.buyBox td.bottomRight { background-image: url(http://ec1.images-amazon.com/images/G/01/nav2/dp/box-br._V23911150_.gif); background-repeat: no-repeat; font-size: 4px; } table.castWithPhotos { margin: 0; padding: 0; } table.castWithPhotos td { padding: 0 8px 3px 0; text-align: center; width: 20%; } table.castWithPhotos tr.castPhoto { vertical-align: bottom; } table.castWithPhotos tr.castName { vertical-align: top; } table.moreBuyingChoices td.topLeft { background-image: url(http://ec1.images-amazon.com/images/G/01/nav2/dp/box-line-tl2._V46891984_.gif); background-repeat: no-repeat; padding-top: 6px; padding-left: 12px; } table.moreBuyingChoices td.topRight { background-image: url(http://ec1.images-amazon.com/images/G/01/nav2/dp/box-line-tr2._V46916405_.gif); background-repeat: no-repeat; } table.moreBuyingChoices td.bottomLeft { background-image: url(http://ec1.images-amazon.com/images/G/01/nav2/dp/box-line-bl._V46906062_.gif); background-repeat: no-repeat; font-size: 4px; } table.moreBuyingChoices td.bottomRight { background-image: url(http://ec1.images-amazon.com/images/G/01/nav2/dp/box-line-br._V46882871_.gif); background-repeat: no-repeat; font-size: 4px; } table.otherEditions td.topLeft { background-image: url(http://ec1.images-amazon.com/images/G/01/nav2/dp/box-line-tl._V46869839_.gif); background-repeat: no-repeat; padding-top: 12px; padding-left: 12px; } table.otherEditions td.topRight { background-image: url(http://ec1.images-amazon.com/images/G/01/nav2/dp/box-line-tr._V46865215_.gif); background-repeat: no-repeat; } table.otherEditions td.bottomLeft { background-image: url(http://ec1.images-amazon.com/images/G/01/nav2/dp/box-line-bl._V46906062_.gif); background-repeat: no-repeat; } table.otherEditions td.bottomRight { background-image: url(http://ec1.images-amazon.com/images/G/01/nav2/dp/box-line-br._V46882871_.gif); background-repeat: no-repeat; } table.otherEditions { margin: 0.25em 0em; } table.otherEditions th { font-size: x-small; text-align: left; padding-right: 10px; } table.otherEditions td { font-size: x-small; } table.otherEditions .listprice { font-size: x-small; } table.otherEditions .price { font-size: x-small; } .caretback { color: #CC6600; font-size: 1.2em; font-weight: bold; text-decoration: none; } .caretnext { color: #CC6600; font-size: 1.2em; font-weight: bold; text-decoration: none; } .disabled { color: #666; } .listRowEven { background-color: #FFFFFF; vertical-align: middle; } .listRowOdd { background-color: #EEF1F6; vertical-align: middle; } .pagination { font-size: .89em; margin-top: 2em; text-align: center; white-space: nowrap; } .pagination a { text-decoration: none; } .pagination a:hover { color: #c60; text-decoration: none; } .pagination .next { margin-left: 1em; } .pagination .numberofresults { margin-bottom: .66em; } .pagination .pages { margin-bottom: 1em; } .pagination .on { color: #000; font-weight: bold; } .pagination .previous { margin-left: 1em; } .productThumbnail { width: 32px; height: 32px; border: 1px solid #999999; text-align: center; } .productThumbnail table { width: 32px; height: 32px; } .productThumbnail table td { text-align: center; } #purchaseSimilarities .product, #sessionSimilarities .product { font-weight: normal; } #purchaseSimilarities .author, #sessionSimilarities .author { font-style: italic; } /* BXGY */ .bxgy-text { margin:0 0 .5em 0; } .bxgy-bundle { margin-right:10px; } /* Similarities */ .sims-faceouts { margin:5px 0 10px 0; } .sims-faceouts p, .sims-faceouts div { margin:3px 0 0 0; padding-right: 10px; } .sims-faceouts .price { white-space:nowrap; } .sims-faceouts .rating-stars { margin: 0 -3px 0 -5px; } .sims-faceouts span.tiny, .cross-product-sims { margin-right:.5em; color:#666; white-space:nowrap; } #productDescription ul, #technicalProductFeatures ul { list-style-type: disc; margin: 1.12em 0; margin-left: 20px; } #productDescription ul li { margin: 0 0 0 20px; } #productDescription ul li ul { list-style-type: disc; margin-left: 20px; } #productDescription ul li ul li { margin: 0 0 0 20px; } .smallFontSize { font-size: small; } .amabot_endcap .amabot_widget { text-align: center; } .amabot_endcap .amabot_widget { border: 1px solid #CCCC99; color: #000000; padding-top: 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; } .amabot_endcap .amabot_widget .h1 {color: #000000; font-size: small; } table.offersAndRebates { margin: 0 0 2em 0; } table.offersAndRebates th { font-size: small; font-weight: bold; text-align: right; padding-left: 8px; } table.offersAndRebates td.offerName { width: 55%; } table.offersAndRebates td.offerTotal { text-align: right; font-weight: bold; } table.offersAndRebates td.rebateAmount { font-weight: bold; } table.offersAndRebates td.purchasedBy, table.offersAndRebates td.postMarkedBy, table.offersAndRebates td.rebateAmount { text-align: right; width: 15%; } .listRowEven { background-color: #FFFFFF; vertical-align: middle; } .listRowOdd { background-color: #EEF1F6; vertical-align: middle; } div.centerColumnSpace { width: 650px; } .avgCustReviewDetailPage { margin-right:30px; } .avgCustReviewDetailPage img { margin-left:-5px; } .rateThisItem { white-space:nowrap; } .writeReview { white-space:nowrap; margin-top:.35em; } .taglpo_count { font-size: 10px; color: #666; margin-left: -4px; } table.alsoRecommended td { padding: 0px 10px 0.5em 0px; text-align: center; width: 180px; vertical-align: middle; } table.alsoRecommended td.productTitle { vertical-align: top; } .alt_images_thumb { display: inline; float: left; margin: 1px; padding: 1px; } .alt_images_thumb_inner { width: 30px; height: 30px; } table td.otherEditions { text-align: left; vertical-align: middle; } .sd { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #000000; } .style1 {color: #008000; font-weight: bold; } .style2 {PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 4px; PADDING-TOP: 4px; margin-BOTTOM: 6px; BACKGROUND-IMAGE: url(http://g-images.amazon.com/images/G/01/kitchen/scheduled-delivery/bkgd.gif); } .style3 {PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 4px; PADDING-TOP: 4px; } .greyBorder {border:1px solid #999999; } .padding4px {padding:4px; } .padLeft4px{padding-left:4px; } .calender-title {background-color: #EEEECC; color: #CC6600; text-align: center; font-weight: bold; font-face: arial; font-size: 9pt;} .calender-title .month-year-name td{text-align: center; width: 150px; height: 30px;} .calender-title .scroll td{text-align: center; width: 30px; height: 30px;} .weekday-header {background-color: white; color: #8C8C8C; width: 30px; height: 30px;} .empty-date {background-color: white; color: white; width: 30px; height: 30px;} td.empty-date {padding-top:4px; padding-bottom:4px; text-align: right; } .weekday-date {background-color: #D6DDEA; color: #8C8C8C; width: 30px; height: 30px;} .weekday-date-small {background-color: #D6DDEA; color: #8C8C8C; width: 10px; height: 10px;} td.weekday-date {text-align: right; padding-top:4px; padding-bottom:4px; font-face: arial; font-size: 9pt;} .selected-date {background-color: #FF9900; color: white; width: 30px; height: 30px;} td.selected-date {padding-top:4px; padding-bottom:4px; text-align: right; font-face: arial; font-size: 9pt;} .highlight-date {background-color: #FFE183; color: #003399; width: 30px; height: 30px;} .highlight-date-small {background-color: #FFE183; color: #003399; width: 10px; height: 10px;} td.highlight-date {padding-top:4px; padding-bottom:4px; text-align: right; font-face: arial; font-size: 9pt;} .smallBold { font-size: smaller; font-weight: bold; } #swatchTable { margin-right: 5px } #swatchTableBorder { border: #9BA9BB 1px solid } .swatchRow { border-bottom: 1px solid #e5e5e5 } ul.linkBullets { padding-left: 0; } ul.linkBullets li { list-style-type: none; margin-top: 1em; margin-bottom: 1em; } ul.noteBullets { padding-left: 0; } ul.noteBullets li { list-style-type: none; } span.darkRedWarning { color: #990000; } li.bullet { margin-left: -1.5em; } .list div { margin-bottom: 0.25em; text-decoration: none; } .dottedtable { border: 1px dotted #999999; } .dottedvertical { border-left-width: 1px; border-left-style: dotted; border-left-color: #999999; } .dottedhorizontal { border-top-width: 1px; border-top-style: dotted; border-top-color: #999999; } a:link .image { border-color: #ccc; border-style: solid; border-width: 1px; } a:visited .image { border-color: #ccc; border-style: solid; border-width: 1px; } a:hover .image { border-color: #cc6600; border-style: solid; border-width: 1px; } .imgborderon { border: #cc6600 solid 1px; } a:active .image { border: 1px solid #cc6600; } a:link { color: #003399; text-decoration: underline; } a:hover { text-decoration : none; color: #cc6600; } .header { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; line-height: 20px; } .notetext { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; color: #666666; } .iou_cust { font-weight: bold; color: #cc6600; } .iou_div { background-color: #ffffdd; text-align: center; padding-bottom: 2px; } td.productLabel { font-weight: bold; text-align: right; white-space: nowrap; vertical-align: top; padding-right: 5px; padding-left: 0px; } table.product { border: 0px; padding: 0px; border-collapse: collapse; } #productFeaturesDiv ul { list-style: disc; padding-left: 25px; } .disclai
1 Comments:
CSS & JavaScript != PHP
Post a Comment
Subscribe to Post Comments [Atom]
<< Home