Tomodachi Life Wiki
mNo edit summary
mNo edit summary
Line 1: Line 1:
  +
// Script credits
/*{{Template:Category|Wiki CSS & JS}}*/
 
  +
// Old chat options - Callofduty4, Madnessfan34537, Fang³
importScriptPage('User:Dragonfree97/chat.js/options2.js','animalcrossing');
 
  +
// New chat options - Gamedezyner, Dragonfree97
  +
// Chattopic - unknown
  +
// Censor and text emotes - MLP wiki
  +
// Stylesheet changer - Roadhawk, Dragonfree97
  +
// ChatTags - LilMissRarity, ShadeTempest, Dragonfree97
  +
  +
// ChatTopic setup
  +
  +
var siteUrl = wgServer.slice(7,-10);
  +
  +
var chatTopicArray = [
  +
{
  +
url: "http://" + siteUrl + ".wikia.com/wiki/Tomodachi Life Wiki:Chat_Rules",
  +
text: "chat rules",
  +
imgUrl: "http://img3.wikia.nocookie.net/__cb20140914153818/d97/images/9/91/Icon_rules.png"
  +
},
  +
{
  +
url: "http://" + siteUrl + ".wikia.com/wiki/Special:RecentChanges",
  +
text: "recent changes",
  +
imgUrl: "http://img3.wikia.nocookie.net/__cb20140914153816/d97/images/7/7c/Icon_recent_changes.png"
  +
},
  +
{
  +
url: "http://" + siteUrl + ".wikia.com/wiki/MediaWiki:Emoticons",
  +
text: "emoticons",
  +
imgUrl: "http://img3.wikia.nocookie.net/__cb20140914153814/d97/images/6/6c/Icon_emoticons.png"
  +
},
  +
{
  +
url: "http://" + siteUrl + ".wikia.com/wiki/Help:ChatTags",
  +
text: "chattags",
  +
imgUrl: "http://img2.wikia.nocookie.net/__cb20140914153812/d97/images/3/3a/Icon_chattags.png"
  +
},
  +
{
  +
url: "http://" + siteUrl + ".wikia.com/wiki/Special:MyPage",
  +
text: "my page",
  +
imgUrl: ""+wgAvatarUrl+""
  +
},
  +
{
  +
url: "http://" + siteUrl + ".wikia.com/wiki/Special:Chat?action=purge",
  +
text: "refresh",
  +
imgUrl: "http://img1.wikia.nocookie.net/__cb20140914153817/d97/images/8/89/Icon_refresh.png"
  +
},
  +
]
  +
  +
// Styleswitcher setup
  +
  +
var stylesheetsArray = [
  +
{
  +
name: "Default",
  +
url: "",
  +
logo: "http://img1.wikia.nocookie.net/__cb20140411121938/tomodachi/images/thumb/8/89/Wiki-wordmark.png/115px-Wiki-wordmark.png"
  +
},
  +
{
  +
name: "Twitch",
  +
url: "http://d97.wikia.com/index.php?title=MediaWiki:Twitch.css&action=raw&ctype=text/css",
  +
logo: "http://img4.wikia.nocookie.net/__cb20141121230158/d97/images/b/b0/Wordmark_twitch_2.png"
  +
}
  +
]
  +
  +
var ssDefaultSkin = "0";
  +
  +
// Imports
  +
  +
setTimeout(function() {
 
importScriptPage('User:Dragonfree97/chat.js/options2.js','animalcrossing');
  +
}, 1000); // Chattopic & options
  +
console.log("Chat options initialized.");
  +
 
importScriptPage('ChatObject/code.js', 'dev' );
 
importScriptPage('ChatObject/code.js', 'dev' );
importScriptPage('Animal Crossing Wiki:Sandbox/CustomChatTags.js', 'animalcrossing');
+
importScriptPage('Animal Crossing Wiki:Sandbox/CustomChatTags.js', 'animalcrossing'); // ChatTags
  +
console.log("ChatTags initialized.");
// Grammar fixer
 
  +
importScriptPage("MediaWiki:StyleSwitcher2.js", "d97"); // Style switcher
 
  +
importScriptPage("MediaWiki:Censor.js", "d97"); // Chat censor
$('[name="message"]').keypress(function(e) {
 
  +
importScriptPage("MediaWiki:TextEmotes.js", "d97"); // text-based emotes
if (e.which == 32||e.which == 13) {
 
  +
importScriptPage('MediaWiki:ChatTopic2.js','d97');
this.value = this.value.replace(/could of /gi, 'could have ');
 
}
 
})
 
   
  +
// END Imports
$('[name="message"]').keypress(function(e) {
 
if (e.which == 32||e.which == 13) {
 
this.value = this.value.replace(/would of /gi, 'would have ');
 
}
 
})
 
   
  +
mainRoom.maxCharacterLimit = 2000;
$('[name="message"]').keypress(function(e) {
 
if (e.which == 32||e.which == 13) {
 
this.value = this.value.replace(/should of /gi, 'should have ');
 
}
 
})
 
   
// END Grammar
+
// Finished loading
  +
$('#loadingnotifier').remove();
  +
console.log("Script loading complete.");

Revision as of 16:49, 7 December 2014

// Script credits
// Old chat options - Callofduty4, Madnessfan34537, Fang³
// New chat options - Gamedezyner, Dragonfree97
// Chattopic - unknown
// Censor and text emotes - MLP wiki
// Stylesheet changer - Roadhawk, Dragonfree97
// ChatTags - LilMissRarity, ShadeTempest, Dragonfree97

// ChatTopic setup

var siteUrl = wgServer.slice(7,-10);

var chatTopicArray = [
   {
   url: "http://" + siteUrl + ".wikia.com/wiki/Tomodachi Life Wiki:Chat_Rules",
   text: "chat rules",
   imgUrl: "http://img3.wikia.nocookie.net/__cb20140914153818/d97/images/9/91/Icon_rules.png"
   },
   {
   url: "http://" + siteUrl + ".wikia.com/wiki/Special:RecentChanges",
   text: "recent changes",
   imgUrl: "http://img3.wikia.nocookie.net/__cb20140914153816/d97/images/7/7c/Icon_recent_changes.png"
   },
   {
   url: "http://" + siteUrl + ".wikia.com/wiki/MediaWiki:Emoticons",
   text: "emoticons",
   imgUrl: "http://img3.wikia.nocookie.net/__cb20140914153814/d97/images/6/6c/Icon_emoticons.png"
   },
   {
   url: "http://" + siteUrl + ".wikia.com/wiki/Help:ChatTags",
   text: "chattags",
   imgUrl: "http://img2.wikia.nocookie.net/__cb20140914153812/d97/images/3/3a/Icon_chattags.png"
   },
   {
   url: "http://" + siteUrl + ".wikia.com/wiki/Special:MyPage",
   text: "my page",
   imgUrl: ""+wgAvatarUrl+""
   },
   {
   url: "http://" + siteUrl + ".wikia.com/wiki/Special:Chat?action=purge",
   text: "refresh",
   imgUrl: "http://img1.wikia.nocookie.net/__cb20140914153817/d97/images/8/89/Icon_refresh.png"
   },
]

// Styleswitcher setup

var stylesheetsArray = [
   {
   name: "Default",
   url: "",
   logo: "http://img1.wikia.nocookie.net/__cb20140411121938/tomodachi/images/thumb/8/89/Wiki-wordmark.png/115px-Wiki-wordmark.png"
   },
   {
   name: "Twitch",
   url: "http://d97.wikia.com/index.php?title=MediaWiki:Twitch.css&action=raw&ctype=text/css",
   logo: "http://img4.wikia.nocookie.net/__cb20141121230158/d97/images/b/b0/Wordmark_twitch_2.png"
   }
]

var ssDefaultSkin = "0";

// Imports

setTimeout(function() { 
    importScriptPage('User:Dragonfree97/chat.js/options2.js','animalcrossing'); 
}, 1000); // Chattopic & options
console.log("Chat options initialized.");

importScriptPage('ChatObject/code.js', 'dev' );
importScriptPage('Animal Crossing Wiki:Sandbox/CustomChatTags.js', 'animalcrossing');  // ChatTags
console.log("ChatTags initialized.");
importScriptPage("MediaWiki:StyleSwitcher2.js", "d97"); // Style switcher
importScriptPage("MediaWiki:Censor.js", "d97"); // Chat censor
importScriptPage("MediaWiki:TextEmotes.js", "d97"); // text-based emotes
importScriptPage('MediaWiki:ChatTopic2.js','d97'); 

// END Imports

mainRoom.maxCharacterLimit = 2000;

// Finished loading
$('#loadingnotifier').remove();
console.log("Script loading complete.");