|
|
(не показано 5 промежуточных версий этого же участника) |
Строка 1: |
Строка 1: |
| $('#searchform').bind('keyup keydown mousedown',
| | // "Add section" at the bottom |
| function (e){ $(this).attr('target', e.shiftKey?'_blank':'') })
| | if ( mw.config.get( 'wgNamespaceNumber' ) && mw.config.get( 'wgAction' ) === 'view' ) { |
| | | $( '#ca-addsection a' ) |
| //"add section" at the bottom | | .clone() |
| if( wgNamespaceNumber && wgAction == 'view' )
| | .addClass( 'ruwiki-addSectionBottom' ) |
| $('#ca-addsection a').clone()
| | .insertAfter( '#content' ); |
| .css({'float':'right', 'font-size':'0.8em', 'color':'#0645ad', 'padding':'4px 0.5em',
| |
| 'background':'#f2f7fb url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAuCAIAAABmjeQ9AAAARElEQVR42mVO2wrAUAhy/f8fz+niVMTYQ3hLKkgGgN/IPvgIhUYYV/qogdP75J01V+JwrKZr/5YPcnzN3e6t7l+2K+EFX91B1daOi7sAAAAASUVORK5CYII=)',
| |
| 'border':'1px outset #a7d7f9', 'border-top-style':'none'})
| |
| .insertAfter('#content')
| |
| | |
| function addShareCurrentArticleUsingAddThis(){
| |
| var h1 = $("div#footer");
| |
| var atthis_toolbox = $('<div class="addthis_toolbox addthis_default_style addShareCurrentArticleUsingAddThis">'
| |
| + '<a class="wiki_addthis_button addthis_button_preferred_1"></a>'
| |
| + '<a class="wiki_addthis_button addthis_button_preferred_2"></a>'
| |
| + '<a class="wiki_addthis_button addthis_button_preferred_3"></a>'
| |
| + '<a class="wiki_addthis_button addthis_button_preferred_4"></a>'
| |
| + '<a class="wiki_addthis_button addthis_button_compact"></a>'
| |
| + '<a class="wiki_addthis_button addthis_counter addthis_bubble_style"></a>'
| |
| + '</div>');
| |
| // always share non-secure version
| |
| atthis_toolbox.attr("addthis:url", 'http:' + wgServer + "/wiki/" + encodeURI(wgPageName));
| |
|
| |
| // find description
| |
| var firstP = mw.util.$content.find("div#mw-content-text > p")[0];
| |
| if ( firstP ) {
| |
| atthis_toolbox.attr("addthis:description", $(firstP).text());
| |
| }
| |
|
| |
| h1.before(atthis_toolbox);
| |
| addthis.init();
| |
| }
| |
|
| |
| if( mw.config.get( 'wgNamespaceNumber' ) == 0 && mw.config.get( 'wgAction' ) == 'view' && !mw.config.get( 'wgIsMainPage' ) ) { | |
|
| |
| importScriptURI('//s7.addthis.com/js/250/addthis_widget.js#pubid=ra-5018f8990d28f6b0&async=1');
| |
|
| |
| var addthis_config = {
| |
| "data_track_clickback": true,
| |
| "ui_language": "ru"
| |
| };
| |
|
| |
| $(function() {
| |
| setTimeout(addShareCurrentArticleUsingAddThis, 1000);
| |
| })
| |
| } | | } |
// "Add section" at the bottom
if ( mw.config.get( 'wgNamespaceNumber' ) && mw.config.get( 'wgAction' ) === 'view' ) {
$( '#ca-addsection a' )
.clone()
.addClass( 'ruwiki-addSectionBottom' )
.insertAfter( '#content' );
}