Jump to content

MediaWiki:Common.js: Difference between revisions

From wiki.comicsgate.org
mNo edit summary
mNo edit summary
Line 4: Line 4:
if(RLCONF.wgUserGroups.length>1) {  
if(RLCONF.wgUserGroups.length>1) {  
$('#p-tb').css('display','block');  
$('#p-tb').css('display','block');  
if(top.location.href.includes('action=edit') && !top.location.href.includes('Common')) {
if(top.location.href.includes('action=edit') && !top.location.href.includes('Common')) {
mw.loader.load( 'https://cdn.jsdelivr.net/npm/tinymce@6.4.0/tinymce.min.js' );  
  mw.loader.load( 'https://cdn.jsdelivr.net/npm/tinymce@6.4.0/tinymce.min.js' );  
mw.loader.load( 'https://cdn.jsdelivr.net/npm/tinymce@6.4.0/skins/ui/oxide/content.min.css' );
  mw.loader.load( 'https://cdn.jsdelivr.net/npm/tinymce@6.4.0/skins/ui/oxide/content.min.css', 'text/css' );
  setTimeout(function(){
  setTimeout(function(){
tinymce.init({  plugins: 'preview importcss searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link media codesample table charmap pagebreak nonbreaking anchor insertdatetime advlist lists  help  quickbars',
  tinymce.init({  plugins: 'preview importcss searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link media codesample table charmap pagebreak nonbreaking anchor insertdatetime advlist lists  help  quickbars',
   menubar: 'edit view insert format tools table code',
   menubar: 'edit view insert format tools table code',
   toolbar: 'undo redo | bold italic underline strikethrough | fontfamily fontsize blocks | alignleft aligncenter alignright alignjustify | outdent indent |  numlist bullist | forecolor backcolor removeformat |  fullscreen  preview save print |  image media link anchor',
   toolbar: 'undo redo | bold italic underline strikethrough | fontfamily fontsize blocks | alignleft aligncenter alignright alignjustify | outdent indent |  numlist bullist | forecolor backcolor removeformat |  fullscreen  preview save print |  image media link anchor help',
quickbars_selection_toolbar: 'bold italic | quicklink h2 h3 blockquote quickimage quicktable',
quickbars_selection_toolbar: 'bold italic | quicklink h2 h3 blockquote quickimage quicktable',
contextmenu: 'link image table',   
  contextmenu: 'link image table',   
   toolbar_sticky: true,
   toolbar_sticky: true,
selector: '#wpTextbox1',forced_root_block : "",extended_valid_elements : '*[*]',cleanup : false,
  selector: '#wpTextbox1',forced_root_block : "",extended_valid_elements : '*[*]',cleanup : false,
     verify_html : false });
     verify_html : false });
},300); }
  },300);  
}  
} //if editor
} //if logged
console.log('Ready');
console.log('Ready');
  },300);
  },300);

Revision as of 19:41, 18 March 2023

/* Any JavaScript here will be loaded for all users on every page load. */ 
setTimeout(function(){ 
var $ = jQuery; 
if(RLCONF.wgUserGroups.length>1) { 
$('#p-tb').css('display','block'); 
 if(top.location.href.includes('action=edit') && !top.location.href.includes('Common')) {
  mw.loader.load( 'https://cdn.jsdelivr.net/npm/tinymce@6.4.0/tinymce.min.js' ); 
  mw.loader.load( 'https://cdn.jsdelivr.net/npm/tinymce@6.4.0/skins/ui/oxide/content.min.css', 'text/css' );
 setTimeout(function(){
  tinymce.init({  plugins: 'preview importcss searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link media codesample table charmap pagebreak nonbreaking anchor insertdatetime advlist lists  help  quickbars',
  menubar: 'edit view insert format tools table code',
  toolbar: 'undo redo | bold italic underline strikethrough | fontfamily fontsize blocks | alignleft aligncenter alignright alignjustify | outdent indent |  numlist bullist | forecolor backcolor removeformat |  fullscreen  preview save print |  image media link anchor help',
quickbars_selection_toolbar: 'bold italic | quicklink h2 h3 blockquote quickimage quicktable',
  contextmenu: 'link image table',  
  toolbar_sticky: true,
  selector: '#wpTextbox1',forced_root_block : "",extended_valid_elements : '*[*]',cleanup : false,
    verify_html : false });
  },300); 
 }  //if editor
} //if logged
console.log('Ready');
 },300);