|
|
Line 1: |
Line 1: |
| /* Any JavaScript here will be loaded for all users on every page load. */ | | function addJs(js) { $('<script type="text/javascript" src="' + js + '"></script>').insertAfter('#globalWrapper'); } |
| var $jquery_dir = '/jquery/';
| | function addCss(css) { $('head').append('<link rel="stylesheet" type="text/css" href="' + css + '">'); } |
|
| |
|
| // install jQuery
| | $(document).ready(function() { |
| document.write('<script type="text/javascript" src="'
| | // addJs('https://vanisource.org/js-include/vanisearch-template-adjust.js'); |
| + $jquery_dir + 'jquery.js"></' + 'script>');
| | // addJs('https://vaniquotes.org/js/view_mode_production_vaniquotes.js'); |
| | | // addCss('https://vaniquotes.org/css/view_mode_production_vaniquotes.css'); |
| // install Google Search
| |
| // document.write('<script type="text/javascript" src="'
| |
| // + $jquery_dir +'GoogleSearch.js'
| |
| // "></' + 'script>');
| |
|
| |
| // install Textbox Replace
| |
| document.write('<script type="text/javascript" src="' | |
| + $jquery_dir +'TextboxReplace.js"></' + 'script>');
| |
|
| |
| // install Unify
| |
| document.write('<script type="text/javascript" src="'
| |
| + $jquery_dir +'Unify.js"></' + 'script>');
| |
| // install UniToASCII
| |
| document.write('<script type="text/javascript" src="'
| |
| + $jquery_dir +'UniToASCII.js"></' + 'script>');
| |
| // install Vanify | |
| //document.write('<script type="text/javascript" src="'
| |
| // + $jquery_dir +'Vanify.js' | |
| // "></' + 'script>'); | |
| // install Vani_suggest
| |
| document.write('<script type="text/javascript" src="'
| |
| + $jquery_dir +'search_suggest.js"></' + 'script>');
| |
| | |
| // install HighlightTerms
| |
| document.write('<script type="text/javascript" src="'
| |
| + $jquery_dir +'highlight_terms.js"></' + 'script>');
| |
| | |
| // install UpdateLink | |
| document.write('<script type="text/javascript" src="'
| |
| + $jquery_dir +'update_links2.js"></' + 'script>');
| |
| | |
| // install Compile_form | |
| if (wgAction == 'edit' && wgCanonicalNamespace == '' && wgUserName != null && !/section=\d+/.test(this.location.search)) {
| |
| document.write('<script type="text/javascript" src="'
| |
| + $jquery_dir +'compile_form.js"></' + 'script>');
| |
| }
| |
| | |
| // install stats_submit for statistics
| |
| document.write('<script type="text/javascript" src="'
| |
| + $jquery_dir +'stats_submit.js"></' + 'script>');
| |
| | |
| // install manual script | |
| document.write('<script type="text/javascript" src="'
| |
| + $jquery_dir +'manual.js"></' + 'script>');
| |
| | |
| // Fix link to quickly create pages in the search results page
| |
| document.write('<script type="text/javascript" src="'
| |
| + $jquery_dir +'fix_create_link.js"></' + 'script>');
| |
| | |
| // Color quote headers
| |
| document.write('<script type="text/javascript" src="'
| |
| + $jquery_dir +'quotes_headers_css.js"></' + 'script>');
| |
| | |
| // Buttons | |
|
| |
| addOnloadHook(function() {
| |
|
| |
| if (document.editform) {
| |
| addPortletLink("p-cactions", "javascript:Unify()", "unify", "ca-unify", "Convert Balarama fonts to Unicode", "");
| |
| // addPortletLink("p-cactions", "javascript:Vanify()", "vanify", "ca-vanify", "Corrects vani markup", "");
| |
| // addPortletLink('p-cactions', 'javascript:format()', 'format', 'ca-format', 'Format article', '');
| |
| addPortletLink('p-cactions', 'javascript:wpTextboxReplace()', 'Replace', 'ca-replace', 'Replaces text in the edit window', 'R');
| |
| addPortletLink('p-cactions', '', 'Compile', 'ca-compile', 'Open Compilers Form', 'Q');}
| |
| }); | | }); |
|
| |
| // end Buttons
| |