מדיה ויקי:Common.js: הבדלים בין גרסאות
מתוך ויקיתרופות
ערן רוזנטל (שיחה | תרומות) |
ערן רוזנטל (שיחה | תרומות) |
||
| שורה 8: | שורה 8: | ||
}); | }); | ||
$('#p-views ul').prepend ( printButton ) ; | $('#p-views ul').prepend ( printButton ) ; | ||
| + | |||
| + | //banner | ||
| + | $(function(){ | ||
| + | var api=new mw.Api(); | ||
| + | api.get({ | ||
| + | action: 'parse', | ||
| + | page: 'תבנית:באנר תחתון', | ||
| + | prop: 'text' | ||
| + | }).then(function (data){ | ||
| + | var banner = data.parse.text['*']; | ||
| + | $('<div class="jThumbnailScroller" style="margin-top:160px;"><div class="jTscrollerContainer"><div class="jTscroller">'+banner+'</div>').insertAfter('#mw-content-text').thumbnailScroller({ | ||
| + | scrollerType:"hoverPrecise", | ||
| + | scrollerOrientation:"horizontal", | ||
| + | scrollSpeed:2, | ||
| + | scrollEasing:"easeOutCirc", | ||
| + | scrollEasingAmount:600, | ||
| + | acceleration:4, | ||
| + | scrollSpeed:800, | ||
| + | noScrollCenterSpace:10, | ||
| + | autoScrolling:0, | ||
| + | autoScrollingSpeed:2000, | ||
| + | autoScrollingEasing:"easeInOutQuad", | ||
| + | autoScrollingDelay:500 | ||
| + | }); | ||
| + | |||
| + | }); | ||
| + | }) | ||
גרסה מתאריך 17:24, 24 בינואר 2014
/* כל סקריפט JavaScript שנכתב כאן ירוץ עבור כל המשתמשים בכל טעינת עמוד */
/* line break after reg owner */
$('.mw-normal-catlinks a[title^="קטגוריה:בעל רישום"]').parent().next().css('border-right','none').before('<br>');
//adds print link
var printButton = $('"<li id="printTab"><span><a href="#" title="להדפסת הדף">הדפסה</a></span></li>').click(function(){
window.print();
});
$('#p-views ul').prepend ( printButton ) ;
//banner
$(function(){
var api=new mw.Api();
api.get({
action: 'parse',
page: 'תבנית:באנר תחתון',
prop: 'text'
}).then(function (data){
var banner = data.parse.text['*'];
$('<div class="jThumbnailScroller" style="margin-top:160px;"><div class="jTscrollerContainer"><div class="jTscroller">'+banner+'</div>').insertAfter('#mw-content-text').thumbnailScroller({
scrollerType:"hoverPrecise",
scrollerOrientation:"horizontal",
scrollSpeed:2,
scrollEasing:"easeOutCirc",
scrollEasingAmount:600,
acceleration:4,
scrollSpeed:800,
noScrollCenterSpace:10,
autoScrolling:0,
autoScrollingSpeed:2000,
autoScrollingEasing:"easeInOutQuad",
autoScrollingDelay:500
});
});
})