[JAVASCRIPT] DYNAMIC TAB TITLE

by Tropical - 09-06-2015, 05:10 AM
Is this cool?
This poll is closed.
Results
Yas
0
Votes
0%
Percent
Yas
0%
0 Votes
I dun care
1
Votes
100.00%
Percent
I dun care
100.00%
1 Votes
Meh...
0
Votes
0%
Percent
Meh...
0%
0 Votes
Fulltime Member
Posts:
1,134
Joined:
Apr 2015
Likes:
51
Credits:
117
Reputation:
37
2 Years of Service
#1
OP
Posted: 09-06-2015, 05:10 AM (This post was last modified: 09-06-2015, 05:12 AM by Tropical.)
This code will code show a recurring title [the thing on the tabs]:

DEMO: http://chains.ml/dynamictitle.html


Code:
<SCRIPT LANGUAGE="JavaScript">

<!--



<!-- Begin

var message = new Array();

// Set your messages below -- follow the pattern.

// To add more messages, just add more elements to the array.

message[0] = "EDIT";

message[1] = "EDIT YOUR ";

message[2] = "EDIT YOUR DAMN";

message[3] = "EDIT YOUR DAMN KITTY";

message[4] = "EDIT YOUR DAMN KITTY MESSAGES";

message[5] = "EDIT YOUR DAMN KITTY MESSAGES IN";

message[6] = "EDIT YOUR DAMN KITTY MESSAGES IN THIS";

message[7] = "EDIT YOUR DAMN KITTY MESSAGES IN THIS ARRAY";





// Set the number of repetitions (how many times the arrow

// cycle repeats with each message).

var reps = 9;

var speed = 1;  // Set the overall speed (larger number = slower action).



// DO NOT EDIT BELOW THIS LINE.

var p = message.length;

var T = "";

var C = 0;

var mC = 0;

var s = 0;

var sT = null;

if (reps < 1) reps = 1;

function doTheThing() {

T = message[mC];

A();

}

function A() {

s++;

if (s > 8) { s = 1;}

// you can fiddle with the patterns here...

if (s == 1) { document.title = ''+T+''; }

if (s == 2) { document.title = ''+T+''; }



if (C < (8 * reps)) {

sT = setTimeout("A()", speed);

C++;

}

else {

C = 0;

s = 0;

mC++;

if(mC > p - 1) mC = 0;

sT = null;

doTheThing();

  }

}

doTheThing();

//  End -->

</script>


Put the above code in your
<head>
CODE SHIT
</head>

The last reply on this thread is older than a month. Please do not unnecessarily bump it.
Register an account or login to reply
Create an account
Create a free account today and start posting right away. It only takes a few seconds.
Login
Log into an existing account.
1 Guest(s)