×
Create a new article
Write your page title here:
We currently have 302 articles on Knights of the Olde Speech. Type your article name above or click on one of the titles below and start writing!



Knights of the Olde Speech

MediaWiki:EmulatorFrame.js: Difference between revisions

No edit summary
No edit summary
Line 1: Line 1:
//Emulator iframe with one of my videos as the default src
//Emulator iframe with one of my videos as the default src
//Meant to be used with [[Template:MusicPlayer]]
mw.hook('wikipage.content').add(function($content) {
mw.hook('wikipage.content').add(function($content) {
     $content.find('.EmulatorFrame:not(.loaded)').each(function() {
     $content.find('.EmulatorFrame:not(.loaded)').each(function() {
Line 7: Line 8:
                 border: 0,
                 border: 0,
                 frameborder: 0,
                 frameborder: 0,
                 height: 540,
                 height: 120,
                 scrolling: 'no',
                 scrolling: 'no',
                 src: 'https://www.youtube.com/embed/_W8j5cU8YUo',
                 src: 'https://www.youtube.com/embed/BHfqz68xEY8',
                 width: 720
                 width: 160
             })
             })
         ).addClass('loaded');
         ).addClass('loaded');
     });
     });
});
});

Revision as of 09:29, 10 June 2020

//Emulator iframe with one of my videos as the default src
//Meant to be used with [[Template:MusicPlayer]]
mw.hook('wikipage.content').add(function($content) {
    $content.find('.EmulatorFrame:not(.loaded)').each(function() {
        var $this = $(this);
        $this.html(
            $('<iframe>', {
                border: 0,
                frameborder: 0,
                height: 120,
                scrolling: 'no',
                src: 'https://www.youtube.com/embed/BHfqz68xEY8',
                width: 160
            })
        ).addClass('loaded');
    });
});