Omitting http/s to follow current proto

This commit is contained in:
斟酌 鵬兄 2017-10-24 10:20:21 +08:00
parent a83b5c0680
commit e2cec00454

View File

@ -13,13 +13,15 @@
/** @type {Components.MessageBox} */ /** @type {Components.MessageBox} */
var MessageBox = __import( "Components.MessageBox" ); var MessageBox = __import( "Components.MessageBox" );
var getData = __import( "System.Net.getData" );
var video = function (insertSnippet, snippetWrap, createContext, override) var video = function (insertSnippet, snippetWrap, createContext, override)
{ {
var temp, i, j var temp, i, j
, getVimeoThumbnail = function (vtag) , getVimeoThumbnail = function (vtag)
{ {
getData("https://vimeo.com/api/oembed.json?url=https%3A//vimeo.com/" + vtag.getAttribute("data-value"), setThumbnail.bind(vtag), noThumb.bind(vtag)); getData("//vimeo.com/api/oembed.json?url=https%3A//vimeo.com/" + vtag.getAttribute("data-value"), setThumbnail.bind(vtag), noThumb.bind(vtag));
} }
, noThumb = function () , noThumb = function ()
@ -92,7 +94,7 @@
, new DataKey("type", i) , new DataKey("type", i)
, new IKey("style" , new IKey("style"
, "width: 640px; height: 390px;" , "width: 640px; height: 390px;"
+ ( (i[0] == "v") ? "" : ("background: black url(https://img.youtube.com/vi/" + v + "/hqdefault.jpg) no-repeat center center;") ) + ( (i[0] == "v") ? "" : ("background: black url(//img.youtube.com/vi/" + v + "/hqdefault.jpg) no-repeat center center;") )
) )
] ]
); );