Created
March 4, 2012 12:34
-
-
Save russau/1972810 to your computer and use it in GitHub Desktop.
marketplace reviews bookmarklet
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
Convert it here: http://subsimple.com/bookmarklets/jsbuilder.htm | |
Adding jquery idea from here: http://net.tutsplus.com/tutorials/javascript-ajax/create-bookmarklets-the-right-way/ |
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
javascript: (function() { | |
if (!($ = window.jQuery)) { // typeof jQuery=='undefined' works too | |
script = document.createElement('script'); | |
script.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'; | |
script.onload = releasetheKraken; | |
document.body.appendChild(script); | |
} | |
else { | |
releasetheKraken(); | |
} | |
function releasetheKraken() { | |
$("#ApplicationReviewsContentId").empty(); | |
$('#reviewsmarketchooserdropdown option').each( | |
function(i, v) { | |
$.get("https://windowsphone.create.msdn.com/ApplicationDetails/ReviewsContent?" + $(v).val(), function(data) { | |
var rating = $('.ratingReviewsTotalText', data).html(); | |
if (rating != '(0)') $("#ApplicationReviewsContentId").append(data); | |
}, 'html'); | |
}); | |
} | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment