Crimson Flame
Would you like to react to this message? Create an account in a few clicks or log in to continue.

TCF Scripts

Go down

TCF Scripts Empty TCF Scripts

Post by CivBase Sun May 03, 2015 1:48 pm

I was bored yesterday, so I decided to take advantage of a couple chrome extensions I have to mess around with TCF.  First, I used the Stylish extension to do a little cleanup.  I added the following CSS for all URLs on the domain "www.thecrimsonflame.com".

Code:
.forabg, .forumbg, .headerbar {
  background-color: #006688;
  background-image: none !important;
}

ul.navlinks {
  text-align: left;
}

#chatbox_header {
  background-color: #006688;
}

#chatbox_footer {
  background-color: #BBBBBB !important;
}

#chatbox_messenger_form .text-field label {
  display: none;
}
  
#message {
  width: 415px;
}

.signature_div {
  display: none;
}

I also used the Blank Canvas Script Handler extension with the following Javascript to automatically log into the chat.

Code:
// ==UserScript==
// @name           TCF Chatbox Autologin
// @description    Automatically login to TCF chatbox
// @author         CivBase
// @include        http://www.thecrimsonflame.com
// @version        1.0
// ==/UserScript==

(function() {
   function login() {
      setTimeout(function() {
         try {
            document.getElementById('frame_chatbox').contentDocument.getElementById('chatbox_option_co').click();
         } catch(e) {
            // pass
         }
      }, 1000);
   }

   function init() {
      if (document.readyState == "complete" || document.readySate == "loaded" || document.readyState == "interactive") {
         login();
      } else {
         document.addEventListener('DOMContentLoaded', login, false);
      }
   }

   init();
})();

Feel free to use, modify, ignore, or do whatever with them. Just figured I'd share.
CivBase
CivBase
Adbot

Male Number of posts : 7336
Location : Etchisketchistan
Registration date : 2008-04-27

http://pathwaygames.forumotion.net/

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum