// No attribution. Who created this???
// Strongest possible source: http://www.vnblogspot.com/2011/12/comment-phan-cap-cho-blogger.html
var Cur_Url_ThreadCM = window.location.href;
var Cm_Block = document.getElementById('cm_block');
var Cm_Block_Content = Cm_Block.innerHTML;
var Cm_Item_Id = [];
var Cm_Item_Content = [];
var Cm_Item_Level = [];
var Cm_Num = 0;
var Cm_Item_Id_T = '';
var Cm_Item_Content_T = '';
var Cm_Item_Level_T = '';
var i = 0;
var j = 0;
var k = 0;
var h = 0;
var strout = '';
var str_t1 = "";
var str_t2 = "";
function getInternetExplorerVersion() {
var rv = -1;
if (navigator.appName == 'Microsoft Internet Explorer') {
var ua = navigator.userAgent;
var re = new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");
if (re.exec(ua) != null) rv = parseFloat(RegExp.$1);
}
return rv;
}
var IE_ver = getInternetExplorerVersion();
if (IE_ver == -1 || IE_ver >= 9) {
while (Cm_Block_Content.indexOf('id="c') != -1) {
i = Cm_Block_Content.indexOf('id="c');
Cm_Block_Content = Cm_Block_Content.substring(i + 4);
i = Cm_Block_Content.indexOf('"');
Cm_Item_Id[Cm_Num] = Cm_Block_Content.substring(0, i);
Cm_Block_Content = Cm_Block_Content.substring(i);
Cm_Item_Content[Cm_Num] = document.getElementById(Cm_Item_Id[Cm_Num]).innerHTML;
Cm_Item_Level[Cm_Num] = 0;
Cm_Num++;
}
for (i = 0; i < Cm_Num - 1; i++) {
for (j = i + 1; j < Cm_Num; j++) {
if (Cm_Item_Content[j].indexOf(Cm_Item_Id[i]) != -1) {
Cm_Item_Id_T = Cm_Item_Id[j];
Cm_Item_Content_T = Cm_Item_Content[j];
Cm_Item_Level[j] = Cm_Item_Level[i] + 1;
Cm_Item_Level_T = Cm_Item_Level[j];
for (h = i + 1; h < j; h++) {
if (Cm_Item_Level[h] < Cm_Item_Level_T) {
break;
}
}
for (k = j; k > h; k = k - 1) {
...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.