Open main menu
Home
Random
Nearby
Log in
Settings
About Kancolle Wiki
Disclaimers
Kancolle Wiki
Search
Changes
← Older edit
Newer edit →
MediaWiki:Common.js
(view source)
Revision as of 02:17, 10 May 2023
408 bytes added
,
1 year ago
no edit summary
Line 335:
Line 335:
//})
//})
−
// Basic webp support
+
// Basic webp
/webm/etc.
support
$('.webp').each(function () {
$('.webp').each(function () {
Line 345:
Line 345:
a.append(img);
a.append(img);
$(this).append(a);
$(this).append(a);
+
});
+
+
$('.webm').each(function () {
+
var video = $('<video>').attr('controls');
+
var source = $('<source>').attr('type', 'video/webm');
+
for (var attr in $(this).data()) {
+
;(attr === 'src' || attr === 'type' ? source : video).attr(attr, (attr === 'src' ? 'https://en.kancollewiki.net/Special:Filepath/' : '') + $(this).data(attr));
+
}
+
video.append(source);
+
$(this).append(video);
});
});
});
});
がか
cssedit, gkautomate
6,928
edits