mirror of
https://github.com/murdos/musicbrainz-userscripts
synced 2024-12-13 11:52:27 +00:00
removes GreaseMonkey's JQuery, uses pure json instead of JSON-P
This commit is contained in:
parent
fca73e80e5
commit
8108a1449b
1 changed files with 2 additions and 10 deletions
|
@ -45,14 +45,9 @@ $(document).ready(function(){
|
|||
var discogsReleaseId = window.location.href.match( /discogs\.com\/(.*\/?)release\/(\d+)$/)[2];
|
||||
var discogsWsUrl = 'http://api.discogs.com/releases/' + discogsReleaseId;
|
||||
|
||||
// Swith JQuery to MB's one, and save GreaseMonkey one
|
||||
var GM_JQuery = $;
|
||||
$ = unsafeWindow.$;
|
||||
|
||||
$.ajax({
|
||||
url: discogsWsUrl,
|
||||
dataType: 'jsonp',
|
||||
headers: { 'Accept-Encoding': 'gzip', 'User-Agent': 'MBDiscosgImporter/0.1 +http://userscripts.org/scripts/show/36376' },
|
||||
dataType: 'json',
|
||||
crossDomain: true,
|
||||
success: function (data, textStatus, jqXHR) {
|
||||
//mylog(data);
|
||||
|
@ -65,9 +60,6 @@ $(document).ready(function(){
|
|||
}
|
||||
});
|
||||
|
||||
// Back to GreaseMonkey's JQuery
|
||||
$ = GM_JQuery;
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -245,7 +237,7 @@ function insertLink(release) {
|
|||
// Analyze Discogs data and return a release object
|
||||
function parseDiscogsRelease(data) {
|
||||
|
||||
var discogsRelease = data.data;
|
||||
var discogsRelease = data;
|
||||
|
||||
var release = new Object();
|
||||
release.discs = [];
|
||||
|
|
Loading…
Reference in a new issue