ملاحظة: بعد الحفظ، أنت قد تحتاج إلى إفراغ الكاش الخاص بمتصفحك لرؤية التغييرات.
- فايرفوكس / سافاري: أمسك Shift أثناء ضغط Reload، أو اضغط على إما Ctrl-F5 أو Ctrl-R (⌘-R على ماك)
- جوجل كروم: اضغط Ctrl-Shift-R (⌘-Shift-R على ماك)
- إنترنت إكسبلورر: أمسك Ctrl أثناء ضغط Refresh، أو اضغط Ctrl-F5
- أوبرا: اذهب إلى Menu → Settings (Opera → Preferences على ماك) ثم إلى Privacy & security → Clear browsing data → Cached images and files.
if ( mw.config.get('wgIsMobile') === false ) {
var doEverything = function ( data ) {
var $sidebarTicker,
$sidebarSection,
list = data.parse.text['*'];
$sidebarTicker = $( '<div class="ticker-wrapper" />' );
$sidebarTicker.append( $( list ).attr( 'id', 'news-ticker' ) );
$sidebarSection = $('<div class="sidebar-section sidebar-section-ticker hidden-print"></div>');
$sidebarSection.append( '<div class="ticker-header"><a href="' + config.headerLink + '" title="' + config.headerTooltip + '">' + config.headerText + '<div class="ticker-expand"><span aria-hidden="true">></span></div></a></div>' );
$sidebarSection.append( $sidebarTicker );
$sidebarSection.insertAfter('.sidebar-section-seealso');
var slider = tns({
container: '#news-ticker',
items: 0,
autoHeight: true,
responsive: {
900: {
items: 3,
gutter: 10,
autoHeight: false
}
},
axis: 'vertical',
swipeAngle: false,
speed: 400,
autoplayTimeout: 2500,
autoplay: true,
arrowKeys: true,
controls: false,
nav: false,
autoplayButtonOutput: false,
autoplayHoverPause: true
});
if ( slider.getInfo().items === 1 ) {
$sidebarTicker.insertAfter( '#top-nav' );
$sidebarSection.hide();
}
};
// Don't start if it's not a view action, or there's no sidebar to attach to
if ( mw.config.get( 'wgAction' ) === 'view' && $('#sidebar-main').length > 0 ) {
var config = mw.config.get( 'newsGadget' ),
api = new mw.Api();
api.get( {
action: 'parse',
prop: 'text',
page: config.sourcePage,
disablelimitreport: true,
wrapoutputclass: ''
} ).done( doEverything );
}
}