зеркало из https://github.com/mozilla/popcorn-js.git
Switched to protocol-less URLs in user facing code [#776]
This commit is contained in:
Коммит
1806744ba7
|
@ -203,13 +203,14 @@ Popcorn.player( "youtube", {
|
|||
src = /^.*(?:\/|v=)(.{11})/.exec( media.src )[ 1 ];
|
||||
query = ( media.src.split( "?" )[ 1 ] || "" ).replace( /v=.{11}/, "" );
|
||||
|
||||
swfobject.embedSWF( "http://www.youtube.com/e/" + src + "?" + query + "&enablejsapi=1&playerapiid=" + container.id + "&version=3",
|
||||
container.id, media.offsetWidth, media.offsetHeight, "8", null, flashvars, params, attributes );
|
||||
swfobject.embedSWF( "//www.youtube.com/e/" + src + "?enablejsapi=1&playerapiid=" + container.id + "&version=3",
|
||||
container.id, media.offsetWidth, media.offsetHeight, "8", null,
|
||||
flashvars, params, attributes );
|
||||
};
|
||||
|
||||
if ( !window.swfobject ) {
|
||||
|
||||
Popcorn.getScript( "http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js", youtubeInit );
|
||||
Popcorn.getScript( "//ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js", youtubeInit );
|
||||
} else {
|
||||
|
||||
youtubeInit();
|
||||
|
|
|
@ -182,7 +182,7 @@
|
|||
if ( !ranOnce || options.event_app_id ) {
|
||||
ranOnce = true;
|
||||
// initialize facebook JS SDK
|
||||
Popcorn.getScript( "http://connect.facebook.net/en_US/all.js" );
|
||||
Popcorn.getScript( "//connect.facebook.net/en_US/all.js" );
|
||||
|
||||
global.fbAsyncInit = function() {
|
||||
FB.init({
|
||||
|
|
|
@ -163,7 +163,7 @@
|
|||
target && target.appendChild( options.container );
|
||||
|
||||
var scriptReady = function() {
|
||||
Popcorn.getJSONP( "http://000000book.com/data/" + options.gmltag + ".json?callback=", function( data ) {
|
||||
Popcorn.getJSONP( "//000000book.com/data/" + options.gmltag + ".json?callback=", function( data ) {
|
||||
|
||||
options.pjsInstance = new Processing( options.container, gmlPlayer );
|
||||
options.pjsInstance.construct( self.media, data, options );
|
||||
|
@ -173,7 +173,7 @@
|
|||
|
||||
if ( !window.Processing ) {
|
||||
|
||||
Popcorn.getScript( "http://processingjs.org/content/download/processing-js-1.3.0/processing-1.3.0.min.js", scriptReady );
|
||||
Popcorn.getScript( "//processingjs.org/content/download/processing-js-1.3.0/processing-1.3.0.min.js", scriptReady );
|
||||
} else {
|
||||
|
||||
scriptReady();
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
len = links.length,
|
||||
head = document.head || document.getElementsByTagName( "head" )[ 0 ],
|
||||
css = document.createElement( "link" ),
|
||||
resource = "http://www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.";
|
||||
resource = "//www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.";
|
||||
|
||||
if ( !window.GFdynamicFeedControl ) {
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
|||
|
||||
if ( !window.google ) {
|
||||
|
||||
Popcorn.getScript( "http://www.google.com/jsapi", function() {
|
||||
Popcorn.getScript( "//www.google.com/jsapi", function() {
|
||||
|
||||
google.load( "feeds", "1", {
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ var googleCallback;
|
|||
// for some reason the Google Map API adds content to the body
|
||||
if ( document.body ) {
|
||||
_mapFired = true;
|
||||
Popcorn.getScript( "http://maps.google.com/maps/api/js?sensor=false&callback=googleCallback" );
|
||||
Popcorn.getScript( "//maps.google.com/maps/api/js?sensor=false&callback=googleCallback" );
|
||||
} else {
|
||||
setTimeout(function () {
|
||||
loadMaps();
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
count: 0,
|
||||
htmlString: "Unknown Artist"
|
||||
};
|
||||
Popcorn.getJSONP( "http://ws.audioscrobbler.com/2.0/?method=artist.getinfo&artist=" + options.artist + "&api_key=" + options.apikey + "&format=json&callback=lastFMcallback", lastFMcallback, false );
|
||||
Popcorn.getJSONP( "//ws.audioscrobbler.com/2.0/?method=artist.getinfo&artist=" + options.artist + "&api_key=" + options.apikey + "&format=json&callback=lastFMcallback", lastFMcallback, false );
|
||||
}
|
||||
_artists[ options.artist ].count++;
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@
|
|||
target = document.getElementById( options.target ),
|
||||
script = document.createElement( "script" );
|
||||
|
||||
Popcorn.getScript( "http://platform.linkedin.com/in.js" );
|
||||
Popcorn.getScript( "//platform.linkedin.com/in.js" );
|
||||
|
||||
options._container = document.createElement( "div" );
|
||||
options._container.appendChild( script );
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
location = new OpenLayers.LonLat( 0, 0 );
|
||||
// query TinyGeocoder and re-center in callback
|
||||
Popcorn.getJSONP(
|
||||
"http://tinygeocoder.com/create-api.php?q=" + options.location + "&callback=jsonp",
|
||||
"//tinygeocoder.com/create-api.php?q=" + options.location + "&callback=jsonp",
|
||||
function( latlng ) {
|
||||
centerlonlat = new OpenLayers.LonLat( latlng[ 1 ], latlng[ 0 ] );
|
||||
options.map.setCenter( centerlonlat );
|
||||
|
@ -100,7 +100,7 @@
|
|||
if ( options.type === "SATELLITE" ) {
|
||||
// add NASA WorldWind / LANDSAT map
|
||||
options.map = new OpenLayers.Map( { div: newdiv, "maxResolution": 0.28125, tileSize: new OpenLayers.Size( 512, 512 ) } );
|
||||
var worldwind = new OpenLayers.Layer.WorldWind( "LANDSAT", "http://worldwind25.arc.nasa.gov/tile/tile.aspx", 2.25, 4, { T: "105" } );
|
||||
var worldwind = new OpenLayers.Layer.WorldWind( "LANDSAT", "//worldwind25.arc.nasa.gov/tile/tile.aspx", 2.25, 4, { T: "105" } );
|
||||
options.map.addLayer( worldwind );
|
||||
displayProjection = new OpenLayers.Projection( "EPSG:4326" );
|
||||
projection = new OpenLayers.Projection( "EPSG:4326" );
|
||||
|
@ -110,7 +110,7 @@
|
|||
displayProjection = new OpenLayers.Projection( "EPSG:4326" );
|
||||
projection = new OpenLayers.Projection( "EPSG:4326" );
|
||||
options.map = new OpenLayers.Map( {div: newdiv, projection: projection } );
|
||||
var relief = new OpenLayers.Layer.WMS( "USGS Terraserver", "http://terraserver-usa.org/ogcmap.ashx?", { layers: "DRG" } );
|
||||
var relief = new OpenLayers.Layer.WMS( "USGS Terraserver", "//terraserver-usa.org/ogcmap.ashx?", { layers: "DRG" } );
|
||||
options.map.addLayer( relief );
|
||||
} else {
|
||||
// add OpenStreetMap layer
|
||||
|
@ -139,7 +139,7 @@
|
|||
|
||||
// insert openlayers api script once
|
||||
if ( !window.OpenLayers ) {
|
||||
Popcorn.getScript( "http://openlayers.org/api/OpenLayers.js" );
|
||||
Popcorn.getScript( "//openlayers.org/api/OpenLayers.js" );
|
||||
}
|
||||
|
||||
var isReady = function() {
|
||||
|
@ -193,7 +193,7 @@
|
|||
},
|
||||
gcThenPlotMarker = function( myMarker ) {
|
||||
Popcorn.getJSONP(
|
||||
"http://tinygeocoder.com/create-api.php?q=" + myMarker.location + "&callback=jsonp",
|
||||
"//tinygeocoder.com/create-api.php?q=" + myMarker.location + "&callback=jsonp",
|
||||
function( latlng ) {
|
||||
var myPoint = new OpenLayers.Geometry.Point( latlng[1], latlng[0] ).transform( displayProjection, projection ),
|
||||
myPointStyle = OpenLayers.Util.extend( {}, layerStyle );
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
}
|
||||
|
||||
if ( !window.Processing ) {
|
||||
Popcorn.getScript( "http://processingjs.org/content/download/processing-js-1.3.0/processing-1.3.0.js", function() {
|
||||
Popcorn.getScript( "//processingjs.org/content/download/processing-js-1.3.0/processing-1.3.0.js", function() {
|
||||
scriptReady( options );
|
||||
});
|
||||
} else {
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
|
||||
if ( !window.TWTR && !scriptLoading ) {
|
||||
scriptLoading = true;
|
||||
Popcorn.getScript( "http://widgets.twimg.com/j/2/widget.js" );
|
||||
Popcorn.getScript( "//widgets.twimg.com/j/2/widget.js" );
|
||||
}
|
||||
|
||||
var target = document.getElementById( options.target );
|
||||
|
|
|
@ -121,7 +121,7 @@ var wikiCallback;
|
|||
};
|
||||
|
||||
if ( options.src ) {
|
||||
Popcorn.getScript( "http://" + options.lang + ".wikipedia.org/w/api.php?action=parse&props=text&page=" +
|
||||
Popcorn.getScript( "//" + options.lang + ".wikipedia.org/w/api.php?action=parse&props=text&page=" +
|
||||
options.src.slice( options.src.lastIndexOf( "/" ) + 1 ) + "&format=json&callback=wikiCallback" + _guid );
|
||||
} else if ( Popcorn.plugin.debug ) {
|
||||
throw new Error( "Wikipedia plugin needs a 'src'" );
|
||||
|
|
Загрузка…
Ссылка в новой задаче