You are not connected. Please login or register

Widget Suggestions

View previous topic View next topic Go down  Message [Page 1 of 1]

1 Widget Suggestions on Fri Dec 18, 2015 5:20 am

avatar
Just a suggestion to help out the roleplayers ^^

[Word Counter!]
Code:
<textarea id="textArea"></textarea><div>Word Length: <span id="textLength">0</span></div>
<script type="text/javascript">
jQuery('#textArea').keyup(function () {
document.getElementById('textLength').innerHTML = document.getElementById('textArea').value.split(/\s+/).length;
});
</script>

[Pop-Up Cbox!]
Code:
$(function() {
  window.$chatBoxLateral = {
    open : 'http://i81.servimg.com/u/f81/11/21/85/73/ouvrir10.png',
    close : 'http://i81.servimg.com/u/f81/11/21/85/73/fermer10.png',
    height : '400px',
    width : '800px',
 
    toggle : function() {
      var container = document.getElementById('chatbox_container').style;
 
      if (this.src == $chatBoxLateral.open) {
        container.width = $chatBoxLateral.width;
        this.src = $chatBoxLateral.close;
      } else {
        container.width = '0px';
        this.src = $chatBoxLateral.open;
      }
    
    }
  };
 
  var container = document.createElement('DIV'),
      button = document.createElement('IMG'),
 
      // container styles
      style = {
        height : $chatBoxLateral.height,
        width : '0px',
        position : 'fixed',
        right : '0px',
        bottom : '30px',
        zIndex : '99999',
        transition : '300ms'
      }, i;
 
  button.id = 'chatbox_button';
  button.src = $chatBoxLateral.open;
  button.style.position = 'absolute';
  button.style.left = '-30px';
  button.onclick = $chatBoxLateral.toggle;
 
  container.id = 'chatbox_container';
  container.innerHTML = '<iframe src="/chatbox" style="width:100%;height:100%;border:none;"></iframe>';
  container.insertBefore(button, container.firstChild);
 
  for (i in style) container.style[i] = style[i];
 
  document.body.appendChild(container);
});
[Quick tip: Might wanna change this part:]
Code:
    open : 'http://i81.servimg.com/u/f81/11/21/85/73/ouvrir10.png',
    close : 'http://i81.servimg.com/u/f81/11/21/85/73/fermer10.png',
    height : '400px',
    width : '800px',

That's it! The Word Counter goes into Widgets, the popup cbox goes into Javascript. Please take it into consideration!

View user profile

2 Re: Widget Suggestions on Tue Jan 05, 2016 9:11 pm

avatar
Alternate CODE

SCREENSHOTS:

Wordcount (left) and Chatbox untoggled (bottom right):
Spoiler:
Chatbox expanded:
Spoiler:
Keep in mind that the chatbox itself follows the colour scheme of the site cbox. so it would look different from this.




CODES

edit: that's too bad. if you ever change your mind, PM me and I'll give you the codes. ^^



Last edited by Erin Cross on Fri Jan 08, 2016 11:35 am; edited 1 time in total

View user profile

3 Re: Widget Suggestions on Tue Jan 05, 2016 10:50 pm

avatar
Admin
I am not currently interested in either of these, sorry.

View user profile http://www.rwbyrpg.com

Sponsored content


View previous topic View next topic Back to top  Message [Page 1 of 1]

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