Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function googlePageTracker(d)
- {
- if (typeof _gat != "undefined" && typeof _gat._getTracker == "function")
- {
- try
- {
- var b = _gat._getTracker("UA-438584-7");
- b._trackPageview("snip_" + d)
- }
- catch (c)
- {}
- }
- }
- var googleHelper = {
- track: function(b)
- {
- if (typeof googlePageTracker == "function")
- {
- googlePageTracker(b)
- }
- }
- };
- var snipAction = {
- maincolor: "yellow",
- snip: null,
- snipicon: null,
- sniptextselector: "",
- snipopen: false,
- snipmousedown: null,
- runsimple: false,
- hassocial: false,
- boxmade: false,
- snipInit: function()
- {
- snipAction.runsimple = navigator.userAgent.indexOf("MSIE") >= 0;
- snipAction.hassocial = (typeof socialAction == "object");
- if (snipAction.hassocial && !socialAction.socialInit())
- {
- snipAction.snipInit2()
- }
- },
- snipInit2: function(b)
- {
- snipAction.snip = $("#snipBox");
- if (!snipAction.boxmade)
- {
- snipAction.newSnipBox(snipAction.maincolor)
- }
- snipAction.boxmade = true;
- snipAction.snip.hide();
- if (window.location.hostname == "localhost")
- {
- snipAction.connectNewIcon()
- }
- if (b && snipHelper && snipHelper.nameHelper)
- {
- snipHelper.nameHelper.setMyName(b)
- }
- },
- connectNewIcon: function(e, d, b)
- {
- if (!snipAction.snip)
- {
- snipAction.snipInit2()
- }
- if (!b && snipAction.hassocial && !socialAction.showScissors())
- {
- return
- }
- if (!e)
- {
- e = "#snipTextIcon"
- }
- if (!d)
- {
- d = "#respArea > table > tbody > tr > td > table > tbody > tr"
- }
- var c = $(e);
- c.prop("fromlist", b);
- c.prop("colour", b ? "green" : "yellow");
- c.addClass(c.prop("colour"));
- if (!b && snipAction.hassocial && socialAction.showVoting())
- {
- socialAction.addVotingButtons(e);
- c.addClass("signedin")
- }
- if (snipAction.runsimple)
- {
- c.show()
- }
- else
- {
- c.fadeTo(0, 0);
- c.delay(200).fadeTo(500, 1)
- }
- if (snipAction.snipopen)
- {
- textAction.makeSnipText(false)
- }
- c.click(new Function('snipAction.openSnipBox("' + e + '", "' + d + '", -1, -1);'));
- if (b)
- {
- $(d).mousedown(new Function("snipAction.mouseDown(this);"))
- }
- if (b)
- {
- $(d).mouseup(new Function('snipAction.mouseUp(this,"' + e + '", "' + d + '");'))
- }
- },
- mouseDown: function(b)
- {
- snipAction.snipmousedown = b
- },
- mouseUp: function(e, h, g)
- {
- if (!snipAction.snipmousedown)
- {
- return
- }
- var d = $(g);
- var f = -1,
- b = -1;
- for (var c = 0; c < d.length; c++)
- {
- if (d[c] == snipAction.snipmousedown)
- {
- f = c
- }
- if (d[c] == e)
- {
- b = c
- }
- }
- snipAction.snipmousedown = null;
- if (b >= 0 && f >= 0 && f < b)
- {
- snipAction.openSnipBox(h, g, f, b)
- }
- },
- openSnipBox: function(f, d, h, j)
- {
- if (snipAction.snipopen)
- {
- if (snipAction.runsimple)
- {
- snipAction.snipopen.show()
- }
- else
- {
- snipAction.snipopen.fadeTo(500, 1)
- }
- }
- snipAction.snipicon = $(f);
- snipAction.sniptextselector = d;
- if (snipAction.snipicon.prop("fromlist"))
- {
- snipAction.snip.addClass("oversocial")
- }
- else
- {
- snipAction.snip.removeClass("oversocial")
- }
- var c = snipAction.snipicon.prop("colour");
- if (snipAction.maincolour != c)
- {
- snipAction.changeSnipBox(c)
- }
- snipAction.snipopen = snipAction.snipicon;
- if (snipAction.runsimple)
- {
- snipAction.snipicon.hide()
- }
- else
- {
- snipAction.snipicon.fadeTo(500, 0)
- }
- textAction.makeSnipText(true, h, j);
- textAction.defaultHighlights();
- if (snipAction.runsimple)
- {
- snipAction.snip.show()
- }
- else
- {
- snipAction.snip.fadeTo(500, 1)
- }
- var i = snipAction.snip.position().top;
- var e = snipAction.snip.outerHeight();
- var g = $(window).scrollTop();
- var b = $(window).height();
- snipAction.snip.css("top", g + 194);
- snipHelper.editHelper.autoadjust = true;
- snipHelper.editHelper.autoadjustbottom = true;
- snipAction.focusInput();
- googleHelper.track("open")
- },
- focusInput: function()
- {
- if (typeof stimFocus == "function")
- {
- stimFocus()
- }
- },
- closeSnipBox: function()
- {
- if (!snipAction.snipopen || !snipAction.snip || !snipAction.snipicon)
- {
- return
- }
- snipAction.snip.removeClass("oversocial");
- snipAction.snipopen = false;
- if (snipAction.runsimple)
- {
- snipAction.snip.hide()
- }
- else
- {
- snipAction.snip.fadeTo(500, 0)
- }
- if (snipAction.runsimple)
- {
- snipAction.snipicon.show()
- }
- else
- {
- snipAction.snipicon.fadeTo(500, 1)
- }
- googleHelper.track("close")
- },
- newSnipBox: function(h)
- {
- snipAction.maincolor = h;
- snipAction.snip.addClass(snipAction.maincolor);
- var x = document.createElement("div");
- $(x).attr("id", "titleIcon");
- snipAction.snip.append(x);
- var E = document.createElement("div");
- $(E).addClass("snipIcon");
- $(x).append(E);
- var I = document.createElement("div");
- $(I).addClass("snipTitle");
- $(x).append(I);
- var g = document.createElement("div");
- $(g).addClass("closecontainer");
- var q = document.createElement("div");
- $(q).addClass("snipX");
- $(q).click(function()
- {
- snipAction.closeSnipBox()
- });
- $(g).append(q);
- var c = document.createElement("div");
- $(c).attr("id", "canstayopen");
- $(g).append(c);
- snipAction.snip.append(g);
- var l = document.createElement("div");
- $(l).attr("id", "contentcontainer");
- snipAction.snip.append(l);
- var b = document.createElement("div");
- $(b).attr("id", "edittopbar");
- var w = document.createElement("div");
- $(w).addClass("barplus");
- $(w).click(snipHelper.editHelper.addTopLine);
- var v = document.createElement("div");
- $(v).addClass("barminus");
- $(v).click(snipHelper.editHelper.subTopLine);
- var d = document.createElement("div");
- $(d).addClass("barme");
- $(d).click(function()
- {
- snipHelper.nameHelper.showNameSelector("me")
- });
- var C = document.createElement("div");
- $(C).addClass("barbot");
- $(C).click(function()
- {
- snipHelper.nameHelper.showNameSelector("bot")
- });
- $(b).append(w);
- $(b).append(v);
- $(b).append(d);
- $(b).append(C);
- var A = document.createElement("div");
- $(A).attr("id", "editbottombar");
- var u = document.createElement("div");
- $(u).addClass("barplus");
- $(u).click(snipHelper.editHelper.addBottomLine);
- var k = document.createElement("div");
- $(k).addClass("barminus");
- $(k).click(snipHelper.editHelper.subBottomLine);
- var o = document.createElement("div");
- $(o).addClass("barcopy");
- $(o).click(snipHelper.editHelper.editSnip);
- $(A).append(u);
- $(A).append(k);
- $(A).append(o);
- var f = document.createElement("div");
- $(f).attr("id", "bbarhtml");
- $(f).addClass("barhtml");
- $(f).click(snipHelper.editHelper.selectHtml);
- $(A).append(f);
- if (snipAction.maincolor != "grey")
- {
- $(f).hide()
- }
- var n = document.createElement("div");
- $(n).attr("id", "nameselector");
- var e = document.createElement("div");
- $(e).attr("id", "sniptextarea");
- snipHelper.nameHelper.mename = snipHelper.nameHelper.meDefaults[snipAction.maincolor];
- snipHelper.nameHelper.botname = snipHelper.nameHelper.botDefaults[snipAction.maincolor];
- var z = document.createElement("div");
- $(z).attr("id", "charactercount");
- var H = document.createElement("div");
- $(H).attr("id", "hashcontainer");
- $(l).append(b);
- $(l).append(n);
- $(l).append(e);
- $(l).append(A);
- $(l).append(z);
- $(l).append(H);
- textAction.makeSnipText(false);
- snipHelper.hashtagHelper.createHashtags();
- if (snipAction.maincolor != "purple")
- {
- $(H).hide()
- }
- var i = document.createElement("div");
- $(i).attr("id", "bottombar");
- snipAction.snip.draggable(
- {
- handle: "#titleIcon,#bottombar"
- });
- snipAction.snip.resizable(
- {
- handle: "#bottombar"
- });
- snipAction.snip.append(i);
- var G = document.createElement("div");
- $(G).attr("id", "bottombarinner");
- $(i).append(G);
- var m = document.createElement("div");
- $(m).attr("id", "snipLeftButton");
- $(m).addClass("snipleft");
- $(m).addClass(snipHelper.formatHelper.snipLefts[snipAction.maincolor]);
- $(m).click(function()
- {
- snipHelper.formatHelper.snipChangeFormat(snipHelper.formatHelper.snipLefts[snipAction.maincolor])
- });
- var t = document.createElement("div");
- $(t).attr("id", "snipRightButton");
- $(t).addClass("snipright");
- $(t).addClass(snipHelper.formatHelper.snipRights[snipAction.maincolor]);
- $(t).click(function()
- {
- snipHelper.formatHelper.snipChangeFormat(snipHelper.formatHelper.snipRights[snipAction.maincolor])
- });
- var j = ["email", "facebook", "twitter", "gplus", "tumblr"];
- if (snipAction.hassocial && socialAction.isSignedIn())
- {
- j.push("share");
- snipAction.snip.addClass("signedin")
- }
- var D = document.createElement("div");
- $(D).addClass("snipsocial");
- for (var p = 0; p < j.length; p++)
- {
- var B = document.createElement("div");
- $(B).addClass(j[p]);
- $(D).append(B);
- $(B).click((function(s)
- {
- return function()
- {
- snipHelper.socialHelper.socialShare(j[s])
- }
- })(p))
- }
- $(G).append(m);
- $(G).append(D);
- $(G).append(t);
- snipHelper.heightHelper.resetMinHeight();
- snipHelper.heightHelper.updateMinHeight()
- },
- changeSnipBox: function(b)
- {
- snipAction.snipicon.prop("colour", b);
- var c = snipAction.maincolor;
- snipHelper.formatHelper.updateCharacterCount();
- snipAction.snip.removeClass(snipAction.maincolor);
- snipAction.maincolor = b;
- snipAction.snip.addClass(snipAction.maincolor);
- snipAction.snipicon.removeClass(c);
- snipAction.snipicon.addClass(snipAction.maincolor);
- snipHelper.nameHelper.mename = snipHelper.nameHelper.meDefaults[snipAction.maincolor];
- snipHelper.nameHelper.botname = snipHelper.nameHelper.botDefaults[snipAction.maincolor];
- textAction.makeSnipText(true);
- $("#snipLeftButton").removeClass(snipHelper.formatHelper.snipLefts[c]);
- $("#snipLeftButton").addClass(snipHelper.formatHelper.snipLefts[snipAction.maincolor]);
- $("#snipRightButton").removeClass(snipHelper.formatHelper.snipRights[c]);
- $("#snipRightButton").addClass(snipHelper.formatHelper.snipRights[snipAction.maincolor]);
- if (snipAction.maincolor == "grey")
- {
- $("#bbarhtml").show()
- }
- else
- {
- $("#bbarhtml").hide()
- }
- snipHelper.hashtagHelper.createHashtags();
- if (snipAction.maincolor == "purple")
- {
- $("#hashcontainer").show()
- }
- else
- {
- $("#hashcontainer").hide()
- }
- $("#nameselector").empty();
- snipHelper.heightHelper.resetMinHeight();
- snipHelper.heightHelper.updateMinHeight();
- textAction.uneditableText()
- }
- };
- var snipHelper = {
- heightHelper:
- {
- defaultmin: 120,
- minheightline: 120,
- resetMinHeight: function()
- {
- minheightline = snipHelper.heightHelper.defaultmin
- },
- setMinHeight: function(b)
- {
- minheightline = b
- },
- updateMinHeight: function()
- {
- var b = minheightline + $("#sniptextarea")[0].scrollHeight + $("#hashcontainer")[0].scrollHeight;
- $(snipAction.snip).css(
- {
- "min-height": b + "px"
- })
- }
- },
- formatHelper:
- {
- snipLefts:
- {
- purple: "grey",
- blue: "purple",
- yellow: "blue",
- green: "yellow",
- grey: "green"
- },
- snipRights:
- {
- purple: "blue",
- blue: "yellow",
- yellow: "green",
- green: "grey",
- grey: "purple"
- },
- snipChangeFormat: function(b)
- {
- snipAction.changeSnipBox(b);
- googleHelper.track("color_" + b)
- },
- updateCharacterCount: function()
- {
- var b = $("#sniptextarea").html();
- $("#charactercount").html(b.length + "/" + (snipAction.maincolor == "blue" ? 140 : 800))
- }
- },
- editHelper:
- {
- tlinemin: 0,
- blinemax: 5,
- tline: 0,
- bline: 5,
- autoadjust: true,
- autoadjustbottom: true,
- addTopLine: function()
- {
- snipHelper.editHelper.autoadjust = false;
- if (snipHelper.editHelper.tline > snipHelper.editHelper.tlinemin)
- {
- snipHelper.editHelper.tline--;
- textAction.makeSnipText(true);
- snipHelper.heightHelper.updateMinHeight()
- }
- else
- {
- textAction.showHighlights()
- }
- googleHelper.track("addTopLine")
- },
- subTopLine: function()
- {
- snipHelper.editHelper.autoadjust = false;
- if (snipHelper.editHelper.tline < snipHelper.editHelper.bline)
- {
- snipHelper.editHelper.tline++;
- textAction.makeSnipText(true);
- snipHelper.heightHelper.updateMinHeight()
- }
- else
- {
- textAction.showHighlights()
- }
- googleHelper.track("subTopLine")
- },
- addBottomLine: function()
- {
- snipHelper.editHelper.autoadjust = false;
- snipHelper.editHelper.autoadjustbottom = false;
- if (snipHelper.editHelper.bline < snipHelper.editHelper.blinemax)
- {
- snipHelper.editHelper.bline++;
- textAction.makeSnipText(true);
- snipHelper.heightHelper.updateMinHeight()
- }
- else
- {
- textAction.showHighlights()
- }
- googleHelper.track("addBottomLine")
- },
- subBottomLine: function()
- {
- snipHelper.editHelper.autoadjust = false;
- snipHelper.editHelper.autoadjustbottom = false;
- if (snipHelper.editHelper.bline > snipHelper.editHelper.tline)
- {
- snipHelper.editHelper.bline--;
- textAction.makeSnipText(true);
- snipHelper.heightHelper.updateMinHeight()
- }
- else
- {
- textAction.showHighlights()
- }
- googleHelper.track("subBottomLine")
- },
- editSnip: function()
- {
- if (textAction.edit == 0)
- {
- textAction.editableText("text");
- $("#sniptextarea>textarea").select()
- }
- else
- {
- $("#sniptextarea>textarea").select()
- }
- googleHelper.track("edit")
- },
- selectHtml: function()
- {
- if (textAction.edit == 0)
- {
- textAction.editableText("html");
- $("#sniptextarea>textarea").select()
- }
- else
- {
- $("#sniptextarea>textarea").select()
- }
- googleHelper.track("html")
- }
- },
- nameHelper:
- {
- meDefaults:
- {
- purple: "|",
- blue: "|",
- yellow: "|",
- green: "Me:",
- grey: "Me:"
- },
- botDefaults:
- {
- purple: "Clev:",
- blue: "Clev:",
- yellow: "Clev:",
- green: "Clev:",
- grey: "Cleverbot:"
- },
- mename: "",
- botname: "",
- unames: ["Me", "me", "Human", "|", "User"],
- bnames: ["Clev", "Cleverbot", "Bot", "bot", "AI"],
- setMyName: function(b)
- {
- snipHelper.nameHelper.meDefaults.green = b + ":";
- snipHelper.nameHelper.meDefaults.grey = b + ":";
- snipHelper.nameHelper.unames[0] = b.substring(0, 1).toUpperCase() + b.substring(1).toLowerCase();
- snipHelper.nameHelper.unames[1] = b
- },
- showNameSelector: function(e)
- {
- var d = snipHelper.nameHelper.unames;
- var c = snipHelper.nameHelper.bnames;
- var f = $("#nameselector");
- $("#nameselector").empty();
- if (e == "me")
- {
- $.each(d, function(g)
- {
- var b = document.createElement("span");
- $(b).html(d[g]);
- if (d[g] + ":" == snipHelper.nameHelper.mename || d[g] == snipHelper.nameHelper.mename)
- {
- $(b).addClass("selected")
- }
- f.append(b);
- if (d[g] == "|")
- {
- $(b).click(function()
- {
- snipHelper.nameHelper.modMeName(d[g]);
- $("#nameselector").empty();
- snipHelper.heightHelper.resetMinHeight();
- snipHelper.heightHelper.updateMinHeight()
- })
- }
- else
- {
- $(b).click(function()
- {
- snipHelper.nameHelper.modMeName(d[g] + ":");
- $("#nameselector").empty();
- snipHelper.heightHelper.resetMinHeight();
- snipHelper.heightHelper.updateMinHeight()
- })
- }
- })
- }
- else
- {
- $.each(c, function(g)
- {
- var b = document.createElement("span");
- $(b).html(c[g]);
- if (c[g] + ":" == snipHelper.nameHelper.botname || c[g] == snipHelper.nameHelper.botname)
- {
- $(b).addClass("selected")
- }
- f.append(b);
- $(b).click(function()
- {
- snipHelper.nameHelper.modBotName(c[g] + ":");
- $("#nameselector").empty();
- snipHelper.heightHelper.resetMinHeight();
- snipHelper.heightHelper.updateMinHeight()
- })
- })
- }
- $("body").click(function(b)
- {
- if (b.target.className != "barme" && b.target.className != "barbot")
- {
- $("#nameselector").empty();
- snipHelper.heightHelper.resetMinHeight();
- snipHelper.heightHelper.updateMinHeight()
- }
- });
- snipHelper.heightHelper.setMinHeight(145);
- snipHelper.heightHelper.updateMinHeight();
- snipHelper.formatHelper.updateCharacterCount()
- },
- modMeName: function(b)
- {
- snipHelper.nameHelper.mename = b;
- textAction.makeSnipText(false);
- googleHelper.track("modMeName")
- },
- modBotName: function(b)
- {
- snipHelper.nameHelper.botname = b;
- textAction.makeSnipText(false);
- googleHelper.track("modBotName")
- }
- },
- socialHelper:
- {
- socialShare: function(d)
- {
- textAction.uneditableText();
- var e = encodeURIComponent("http://www.cleverbot.com/");
- var h = encodeURIComponent("Snip! from Cleverbot");
- var g = $("#sniptextarea").html();
- var b = new RegExp('<span style="color:s?#787878">' + snipHelper.nameHelper.mename + "</span>", "gi");
- var c = new RegExp('<a style="color:s?#0863bb" href="http://www.cleverbot.com/">' + snipHelper.nameHelper.botname + "</a>", "gi");
- var f = new RegExp('<a href="http://www.cleverbot.com/" style="color:s?#0863bb">' + snipHelper.nameHelper.botname + "</a>", "gi");
- g = g.replace(/<br>/gi, "\n");
- g = g.replace(b, snipHelper.nameHelper.mename);
- g = g.replace(c, snipHelper.nameHelper.botname);
- g = g.replace(f, snipHelper.nameHelper.botname);
- strnotenc = g;
- g = encodeURIComponent(g);
- switch (d)
- {
- case "email":
- window.location.href = "mailto:?subject=" + h + "&body=" + g;
- if (snipAction.hassocial)
- {
- socialAction.addSnip("email", h, strnotenc)
- }
- break;
- case "facebook":
- var h = "Snip! from Cleverbot";
- window.open("http://www.facebook.com/sharer/sharer.php?s=100&p[title]=" + h + "&p[summary]=" + g + "&p[url]=" + e, "", "width=626,height=436");
- if (snipAction.hassocial)
- {
- socialAction.addSnip("facebook", h, strnotenc)
- }
- break;
- case "twitter":
- g = g.replace(/%23cleverbot/g, "%40cleverbot");
- window.open("https://twitter.com/share?text=" + g, "", "menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600");
- if (snipAction.hassocial)
- {
- socialAction.addSnip("twitter", h, strnotenc)
- }
- break;
- case "gplus":
- window.open("https://plus.google.com/share?url=" + e, "", "menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600");
- if (snipAction.hassocial)
- {
- socialAction.addSnip("google", h, strnotenc)
- }
- break;
- case "tumblr":
- var h = "Snip! from Cleverbot";
- window.open("http://www.tumblr.com/share/link?url=" + e + "&name=" + h + "&description=" + g, "", "menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=500,width=600");
- if (snipAction.hassocial)
- {
- socialAction.addSnip("tumblr", h, strnotenc)
- }
- break;
- case "share":
- if (snipAction.hassocial)
- {
- socialAction.prepareToAddSnip(strnotenc);
- snipAction.closeSnipBox()
- }
- break
- }
- if (sID)
- {
- googleHelper.track("social_" + d + "_" + sID.substring(0, 3))
- }
- }
- },
- hashtagHelper:
- {
- hashmax: 5,
- uncommonchars: ["w", "y", "v", "k", "g", "q", "l", "x", "z"],
- cleverwords: ["me", "user", "clev", "cleverbot", "bot", "ai"],
- defaulthash: ["cleverbot", "ai", "clever"],
- commonwords: ["a", "i", "am", "an", "as", "at", "be", "by", "do", "go", "he", "if", "im", "in", "is", "it", "me", "my", "no", "of", "oh", "on", "or", "so", "to", "up", "us", "we", "act", "add", "age", "ago", "air", "all", "and", "any", "are", "ask", "bed", "big", "box", "boy", "but", "can", "car", "cry", "cut", "day", "did", "dog", "dry", "eat", "end", "eye", "far", "few", "fly", "for", "get", "got", "had", "has", "her", "her", "hes", "him", "him", "his", "hot", "hot", "how", "its", "lay", "let", "lot", "low", "man", "map", "may", "men", "new", "now", "off", "old", "one", "our", "out", "own", "put", "ran", "red", "run", "saw", "say", "sea", "see", "set", "she", "she", "sit", "six", "sun", "ten", "the", "too", "top", "try", "two", "use", "war", "was", "way", "who", "why", "yes", "yet", "you", "able", "also", "area", "back", "base", "been", "best", "bird", "blue", "boat", "body", "book", "both", "busy", "call", "came", "care", "city", "cold", "come", "dark", "deep", "does", "done", "door", "down", "draw", "each", "ease", "east", "else", "even", "ever", "face", "fact", "fall", "farm", "fast", "feel", "feet", "fill", "find", "fine", "fire", "fish", "five", "food", "foot", "form", "four", "free", "from", "full", "game", "gave", "girl", "give", "gold", "good", "grow", "half", "hand", "hard", "have", "head", "hear", "heat", "hell", "help", "here", "high", "hold", "home", "hour", "idea", "inch", "just", "keep", "kind", "king", "knew", "know", "land", "last", "late", "lead", "left", "less", "life", "like", "line", "list", "live", "long", "look", "love", "made", "main", "make", "many", "mark", "mean", "mile", "mind", "mine", "miss", "moon", "more", "most", "move", "much", "must", "name", "near", "need", "next", "note", "noun", "once", "only", "open", "over", "page", "part", "pass", "plan", "play", "port", "pose", "pull", "rain", "read", "real", "rest", "road", "rock", "room", "rule", "said", "same", "seem", "self", "shes", "ship", "show", "side", "sing", "size", "slow", "snow", "some", "song", "soon", "star", "stay", "step", "stop", "such", "sure", "tail", "take", "talk", "tell", "test", "than", "that", "them", "then", "they", "this", "time", "told", "took", "town", "tree", "true", "turn", "unit", "very", "wait", "walk", "want", "warm", "week", "well", "went", "were", "west", "what", "when", "will", "wind", "with", "wood", "word", "work", "year", "your", "your", "about", "above", "after", "again", "among", "began", "begin", "black", "bring", "build", "carry", "cause", "check", "class", "clear", "close", "color", "could", "cover", "cross", "didnt", "don't", "drive", "early", "every", "field", "final", "first", "force", "found", "front", "great", "group", "heard", "horse", "large", "laugh", "learn", "leave", "light", "might", "music", "never", "night", "north", "often", "order", "other", "paper", "piece", "place", "plain", "plane", "plant", "point", "pound", "power", "press", "quick", "reach", "ready", "right", "river", "round", "serve", "shape", "shell", "short", "since", "sleep", "small", "sound", "south", "spell", "stand", "start", "state", "still", "stood", "story", "study", "table", "teach", "their", "there", "these", "thing", "think", "those", "three", "under", "until", "usual", "voice", "watch", "water", "wheel", "where", "which", "while", "white", "whole", "world", "would", "write", "young", "youre", "yours", "always", "animal", "answer", "appear", "beauty", "before", "behind", "better", "center", "change", "common", "course", "decide", "differ", "direct", "during", "enough", "family", "father", "figure", "follow", "friend", "govern", "ground", "happen", "letter", "listen", "little", "minute", "mother", "notice", "number", "object", "people", "person", "record", "school", "second", "should", "simple", "street", "strong", "theyre", "though", "toward", "travel", "weight", "wonder", "against", "anybody", "between", "brought", "certain", "contain", "correct", "country", "develop", "example", "hundred", "measure", "morning", "nothing", "numeral", "pattern", "perhaps", "picture", "problem", "produce", "product", "several", "someone", "special", "surface", "thought", "through", "anything", "children", "complete", "everyone", "interest", "possible", "question", "remember", "sentence", "thousand", "together", "something", "somewhere", "ah", "not", "thats", "lol", "wtf", "yup", "yep", "yeah", "yes", "nope", "hows", "how", "going", "ok", "okay", "bet"],
- createHashtags: function()
- {
- var b = $("#hashcontainer");
- var e = snipHelper.hashtagHelper.suggestHashtags();
- b.empty();
- for (var d in e)
- {
- var c = document.createElement("span");
- $(c).html("#" + e[d]);
- b.append(c);
- $(c).click(snipHelper.hashtagHelper.injectHash)
- }
- snipHelper.heightHelper.resetMinHeight();
- snipHelper.heightHelper.updateMinHeight()
- },
- injectHash: function()
- {
- var b = $("#sniptextarea");
- var c = $(this).html();
- b.html(b.html() + " " + c);
- $(this).remove();
- snipHelper.heightHelper.updateMinHeight()
- },
- suggestHashtags: function()
- {
- var i = $("#sniptextarea").html();
- i = i.toLowerCase();
- i = i.replace(/[\.,-\/#!?'$%\^&\*;:{}=\-_`~()\|]/g, "");
- i = i.split(" ");
- for (var e = 0; e < i.length; e++)
- {
- if (i[e] == "")
- {
- i.splice(e, 1);
- e--
- }
- else
- {
- if ($.inArray(i[e], snipHelper.hashtagHelper.cleverwords) > -1)
- {
- i.splice(e, 1);
- e--
- }
- else
- {
- if ($.inArray(i[e], snipHelper.hashtagHelper.commonwords) > -1)
- {
- i.splice(e, 1);
- e--
- }
- }
- }
- }
- var d = [];
- for (e in i)
- {
- if ($.inArray(i[e], d) == -1)
- {
- d.push(i[e])
- }
- }
- i = d;
- i = snipHelper.hashtagHelper.randomizeHashtags(i);
- if (i.length > snipHelper.hashtagHelper.hashmax)
- {
- var b = i.length - snipHelper.hashtagHelper.hashmax;
- var f = 0;
- for (e = 0; e < i.length; e++)
- {
- if (i[e].length <= 5)
- {
- for (var c = 0; c < snipHelper.hashtagHelper.uncommonchars.length; c++)
- {
- if (snipAction.runsimple)
- {
- for (var h = 0; h < i[e].length; h++)
- {
- if (h == i[e])
- {
- break
- }
- }
- }
- else
- {
- if ($.inArray(snipHelper.hashtagHelper.uncommonchars[c], i[e]) > -1)
- {
- break
- }
- }
- }
- if (c == snipHelper.hashtagHelper.uncommonchars.length && f < b)
- {
- i.splice(e, 1);
- e--;
- f++
- }
- }
- }
- var g = i.length - b + f - 1;
- for (e = i.length - 1; e > g; e--)
- {
- i.splice(e, 1)
- }
- }
- i = snipHelper.hashtagHelper.defaulthash.concat(i);
- return i
- },
- randomizeHashtags: function(e)
- {
- var c = [];
- var f = [];
- for (var d = 0; d < e.length; d++)
- {
- var b = Math.floor(Math.random() * e.length);
- while ($.inArray(b, f) != -1)
- {
- b = Math.floor(Math.random() * e.length)
- }
- f.push(b);
- c[d] = e[b]
- }
- return c
- }
- }
- };
- var textAction = {
- edit: 0,
- editmode: "text",
- ln: 0,
- colorset: [],
- prevtext: "",
- makeSnipText: function(b, d, c)
- {
- var f = "";
- var e = $(snipAction.sniptextselector);
- switch (snipAction.maincolor)
- {
- case "purple":
- f += textAction.makeShortText(e, d, c);
- break;
- case "blue":
- f += "@cleverbot ";
- f += textAction.makeShortText(e, d, c);
- break;
- case "yellow":
- f += textAction.makeShortText(e, d, c);
- f += " #cleverbot";
- break;
- case "green":
- f += textAction.makeLongText(e, false, d, c);
- break;
- case "grey":
- f += textAction.makeLongText(e, true, d, c);
- break
- }
- if (b)
- {
- textAction.showHighlights()
- }
- $("#sniptextarea").html(f);
- snipHelper.formatHelper.updateCharacterCount();
- snipHelper.hashtagHelper.createHashtags();
- if (snipAction.maincolor == "purple")
- {
- $("#hashcontainer").show()
- }
- else
- {
- $("#hashcontainer").hide()
- }
- },
- defaultHighlights: function()
- {
- var b = $(snipAction.sniptextselector);
- textAction.ln = 0;
- b.each(function()
- {
- if ($(this).find("td>span").attr("id") == "typArea")
- {
- textAction.colorset[textAction.ln] = $(this).find("td>span>span").css("color")
- }
- else
- {
- textAction.colorset[textAction.ln] = $(this).find("td>span").css("color")
- }
- textAction.ln++
- })
- },
- clearHighlights: function()
- {
- var b = $(snipAction.sniptextselector);
- textAction.ln = 0;
- b.each(function()
- {
- var c = $(this);
- if (c.find("td>span").attr("id") == "typArea")
- {
- c.find("td>span>span").animate(
- {
- backgroundColor: "transparent",
- color: textAction.colorset[textAction.ln]
- }, 500)
- }
- else
- {
- c.find("td>span").animate(
- {
- backgroundColor: "transparent",
- color: textAction.colorset[textAction.ln]
- }, 500)
- }
- textAction.ln++
- })
- },
- showHighlights: function()
- {
- var d = $(snipAction.sniptextselector);
- var c = {
- purple: "#EAEDF9",
- blue: "#E3F4F7",
- yellow: "#FFF6CD",
- green: "#ECFFD4",
- grey: "#F8F8F7"
- };
- var b = {
- purple: "#5A6DCA",
- blue: "#008AA6",
- yellow: "#BC8A03",
- green: "#559502",
- grey: "#666666"
- };
- textAction.ln = 0;
- d.each(function()
- {
- if (textAction.ln >= snipHelper.editHelper.tline && textAction.ln <= snipHelper.editHelper.bline)
- {
- if ($(this).find("td>span").attr("id") == "typArea")
- {
- $(this).find("td>span>span").css("marginRight", "-3px");
- $(this).find("td>span>span").css("padding", "3px");
- $(this).find("td>span>span").css("marginLeft", "-3px");
- $(this).find("td>span>span").css("borderRadius", "3px");
- $(this).find("td>span>span").animate(
- {
- backgroundColor: c[snipAction.maincolor],
- color: b[snipAction.maincolor]
- }, 500)
- }
- else
- {
- $(this).find("td>span").css("padding", "3px");
- $(this).find("td>span").css("marginLeft", "-3px");
- $(this).find("td>span").css("borderRadius", "3px");
- $(this).find("td>span").animate(
- {
- backgroundColor: c[snipAction.maincolor],
- color: b[snipAction.maincolor]
- }, 500)
- }
- }
- textAction.ln++
- });
- window.setTimeout(textAction.clearHighlights, 1000)
- },
- makeShortText: function(f, e, c)
- {
- var g = "";
- var b = "";
- if (snipHelper.nameHelper.mename != "|")
- {
- b = snipHelper.nameHelper.mename + " "
- }
- textAction.ln = 0;
- var d = textAction.countLines(f);
- snipHelper.editHelper.blinemax = d - 1;
- if (d > 4 && snipHelper.editHelper.autoadjust)
- {
- snipHelper.editHelper.tline = d >= 10 ? d - 10 : 2
- }
- if (snipHelper.editHelper.autoadjustbottom)
- {
- snipHelper.editHelper.bline = d - 1
- }
- if (e >= 0 && c >= 0 && e < c)
- {
- snipHelper.editHelper.tline = e;
- snipHelper.editHelper.bline = c
- }
- f.each(function()
- {
- if ($(this).hasClass("user"))
- {
- if (textAction.ln == snipHelper.editHelper.tline)
- {
- g += b + $(this).find("td>span").html()
- }
- else
- {
- if (textAction.ln > snipHelper.editHelper.tline && textAction.ln <= snipHelper.editHelper.bline)
- {
- g += " " + snipHelper.nameHelper.mename + " " + $(this).find("td>span").html()
- }
- }
- textAction.ln++
- }
- if ($(this).hasClass("bot"))
- {
- if (textAction.ln <= snipHelper.editHelper.bline && $(this).find("td>span").attr("id") == "typArea")
- {
- g += " " + snipHelper.nameHelper.botname + " " + $(this).find("td>span>span").html()
- }
- else
- {
- if (textAction.ln == snipHelper.editHelper.tline)
- {
- g += snipHelper.nameHelper.botname + " " + $(this).find("td>span").html()
- }
- else
- {
- if (textAction.ln > snipHelper.editHelper.tline && textAction.ln <= snipHelper.editHelper.bline)
- {
- g += " " + snipHelper.nameHelper.botname + " " + $(this).find("td>span").html()
- }
- }
- }
- textAction.ln++
- }
- });
- g = textAction.prettyAction(g);
- return g
- },
- makeLongText: function(b, f, g, j)
- {
- var h = "";
- var d = "";
- if (snipHelper.nameHelper.mename != "|")
- {
- d = snipHelper.nameHelper.mename
- }
- textAction.ln = 0;
- var c = textAction.countLines(b);
- snipHelper.editHelper.blinemax = c - 1;
- if (c > 4 && snipHelper.editHelper.autoadjust)
- {
- snipHelper.editHelper.tline = c >= 10 ? c - 10 : 2
- }
- var e = "<br/>";
- var i = textAction.countUsableLines(b);
- if (i == 1)
- {
- e = ""
- }
- if (snipHelper.editHelper.autoadjustbottom)
- {
- snipHelper.editHelper.bline = c - 1
- }
- if (g >= 0 && j >= 0 && g < j)
- {
- snipHelper.editHelper.tline = g;
- snipHelper.editHelper.bline = j
- }
- b.each(function()
- {
- if ($(this).hasClass("user"))
- {
- if (textAction.ln == snipHelper.editHelper.tline)
- {
- if (f)
- {
- h += "<span style='color:#787878'>" + snipHelper.nameHelper.mename + "</span> " + $(this).find("td>span").html()
- }
- else
- {
- h += snipHelper.nameHelper.mename + " " + $(this).find("td>span").html()
- }
- }
- else
- {
- if (textAction.ln > snipHelper.editHelper.tline && textAction.ln <= snipHelper.editHelper.bline)
- {
- if (f)
- {
- h += e + "<span style='color:#787878'>" + snipHelper.nameHelper.mename + "</span> " + $(this).find("td>span").html()
- }
- else
- {
- h += e + snipHelper.nameHelper.mename + " " + $(this).find("td>span").html()
- }
- }
- }
- textAction.ln++
- }
- if ($(this).hasClass("bot"))
- {
- if (textAction.ln <= snipHelper.editHelper.bline && $(this).find("td>span").attr("id") == "typArea")
- {
- if (f)
- {
- h += e + "<a href='http://www.cleverbot.com/' style='color:#0863bb'>" + snipHelper.nameHelper.botname + "</a> " + $(this).find("td>span>span").html()
- }
- else
- {
- h += e + snipHelper.nameHelper.botname + " " + $(this).find("td>span>span").html()
- }
- }
- else
- {
- if (textAction.ln == snipHelper.editHelper.tline)
- {
- if (f)
- {
- h += "<a href='http://www.cleverbot.com/' style='color:#0863bb'>" + snipHelper.nameHelper.botname + "</a> " + $(this).find("td>span").html()
- }
- else
- {
- h += snipHelper.nameHelper.botname + " " + $(this).find("td>span").html()
- }
- }
- else
- {
- if (textAction.ln > snipHelper.editHelper.tline && textAction.ln <= snipHelper.editHelper.bline)
- {
- if (f)
- {
- h += e + "<a href='http://www.cleverbot.com/' style='color:#0863bb'>" + snipHelper.nameHelper.botname + "</a> " + $(this).find("td>span").html()
- }
- else
- {
- h += e + snipHelper.nameHelper.botname + " " + $(this).find("td>span").html()
- }
- }
- }
- }
- textAction.ln++
- }
- });
- h = textAction.prettyAction(h);
- return h
- },
- prettyAction: function(b)
- {
- b = b.replace(/[*]([^*]*)[*][.]/g, "*$1*");
- return b
- },
- countLines: function(c)
- {
- var b = 0;
- c.each(function()
- {
- if ($(this).hasClass("user") || $(this).hasClass("bot"))
- {
- b++
- }
- });
- return b
- },
- countUsableLines: function(d)
- {
- var b = 0;
- var c = 0;
- d.each(function()
- {
- if ($(this).hasClass("user"))
- {
- if (c == snipHelper.editHelper.tline)
- {
- b++
- }
- else
- {
- if (c > snipHelper.editHelper.tline && c <= snipHelper.editHelper.bline)
- {
- b++
- }
- }
- c++
- }
- if ($(this).hasClass("bot"))
- {
- if (c <= snipHelper.editHelper.bline && $(this).find("td>span").attr("id") == "typArea")
- {
- b++
- }
- else
- {
- if (c == snipHelper.editHelper.tline)
- {
- b++
- }
- else
- {
- if (c > snipHelper.editHelper.tline && c <= snipHelper.editHelper.bline)
- {
- b++
- }
- }
- }
- c++
- }
- });
- return b
- },
- editableText: function(e)
- {
- textAction.editmode = e;
- if (textAction.edit == 0 && textAction.editmode == "text")
- {
- textAction.edit = 1;
- var b = document.createElement("textarea");
- var g = $("#sniptextarea").html();
- var c = new RegExp('<span style="color:s?#787878">' + snipHelper.nameHelper.mename + "</span>", "gi");
- var d = new RegExp('<a style="color:s?#0863bb" href="http://www.cleverbot.com/">' + snipHelper.nameHelper.botname + "</a>", "gi");
- var f = new RegExp('<a href="http://www.cleverbot.com/" style="color:s?#0863bb">' + snipHelper.nameHelper.botname + "</a>", "gi");
- g = g.replace(/<br>/gi, "\n");
- g = g.replace(c, snipHelper.nameHelper.mename);
- g = g.replace(d, snipHelper.nameHelper.botname);
- g = g.replace(f, snipHelper.nameHelper.botname);
- $(b).val(g);
- $("#sniptextarea").empty();
- $("#sniptextarea").append(b);
- $(b).height($(b)[0].scrollHeight + "px");
- $(b).focus();
- $(b).blur(function()
- {
- textAction.uneditableText(e)
- })
- }
- else
- {
- if (textAction.edit == 0 && textAction.editmode == "html")
- {
- textAction.edit = 1;
- var b = document.createElement("textarea");
- var g = $("#sniptextarea").html();
- textAction.prevtext = g;
- $(b).val(g);
- $("#sniptextarea").empty();
- $("#sniptextarea").append(b);
- $(b).height($(b)[0].scrollHeight + "px");
- $(b).select();
- $(b).blur(function()
- {
- textAction.uneditableText(e)
- })
- }
- }
- snipHelper.heightHelper.updateMinHeight()
- },
- uneditableText: function()
- {
- if (textAction.edit == 1 && textAction.editmode == "text" && $("#sniptextarea>textarea").val())
- {
- textAction.edit = 0;
- var d = $("#sniptextarea>textarea").val();
- d = d.replace(/\n/g, "<br>");
- if (snipAction.maincolor == "grey")
- {
- var b = new RegExp(snipHelper.nameHelper.mename, "g");
- var c = new RegExp(snipHelper.nameHelper.botname, "g");
- d = d.replace(b, '<span style="color:#787878">' + snipHelper.nameHelper.mename + "</span>");
- d = d.replace(c, '<a href="http://www.cleverbot.com/" style="color:#0863bb">' + snipHelper.nameHelper.botname + "</a>")
- }
- $("#sniptextarea").html(d)
- }
- else
- {
- if (textAction.edit == 1 && textAction.editmode == "html" && $("#sniptextarea>textarea").val())
- {
- textAction.edit = 0;
- var d = textAction.prevtext;
- $("#sniptextarea").html(d)
- }
- else
- {
- textAction.edit = 0
- }
- }
- textAction.editmode = "";
- snipHelper.formatHelper.updateCharacterCount();
- snipHelper.heightHelper.updateMinHeight()
- }
- };
- var socialAction = {
- debugMode: 0,
- maintenanceMode: 0,
- maintenanceMessage: "Cleverbot sign in is currently unavailable. You can still chat, but not sign in.",
- signupMessage: 'Cleverbot sign in is in beta, currently available only in some places, and could temporarily become unavailable. Please <a href="/contact">send us your feedback</a>',
- signedin: 0,
- rememberSignin: 30,
- user:
- {},
- lookingAtUserid: 0,
- lookingAtTab: "",
- lookingAtHistory: [],
- replyingtoid: 0,
- lastSearch: "no-search-yet",
- allusers:
- {},
- allsnips:
- {},
- allconversations:
- {},
- loadEachTime: 10,
- sortFieldTemp: "",
- dataLoads:
- {},
- imageBase: "http://www.cleverbot.com/s/social/img/",
- jsonurl: "https://social.cleverbot.com/process.php",
- uploadurl: "http://social.cleverbot.com/process.php",
- uploadDimensions:
- {
- photo:
- {
- width: 80,
- height: 80
- },
- header:
- {
- width: 500,
- height: 200
- }
- },
- textareaMaxLength: 160,
- textareaMaxLengthSnip: 280,
- stuckMenu: 0,
- stuckUserMenu: 0,
- conversationCurrentId: 0,
- conversationShowInteractions: 10,
- conversationLastInteraction: -1,
- conversationLastSessionId: "",
- conversationTypes: ["choose one", "curiosity", "research", "cybersex", "other"],
- conversationHowHuman: ["choose one", "not at all", "not very", "middling", "quite human", "very human!"],
- conversationHowSatisfied: ["choose one", "not at all", "not very", "middling", "satisfied", "very satisfied!"],
- vote: 0,
- voteDistance: 0,
- voteLabels: ["awful", "bad", "okay", "good", "great!"],
- timeServer: 0,
- timeDifference: 0,
- timeLookupDelay: 60,
- timeLookupCounterStart: 4,
- timeLookupCounter: 0,
- runSimple: false,
- initialSnips: [
- {
- "id": "10677",
- "username": "abcdggg",
- "fullname": "That one person",
- "location": "Is it weird for a girl to like Mega Man?",
- "biography": "Hello! I am a girl who loves Mega Man and Yu-Gi-Oh!",
- "suggested": "0",
- "headercolour": "rgba(64,60,49,0.28)",
- "headercolourborder": "rgb(87,83,74)",
- "accesslevel": "1",
- "numfollowers": "45",
- "numfollowing": "8",
- "numsnips": "9",
- "createddate": "9 February 2015 19:48:49",
- "mainuserid": "64891",
- "userid": "64891",
- "parentid": "0",
- "lastchildid": "10721",
- "unstar": "0",
- "ratingscount": "4",
- "ratingstotal": "12",
- "sortdate": "10 February 2015 19:11:58",
- "numchildren": "2",
- "sniptype": "",
- "sniptext": "Clev: Knock Knock | Who's there? Clev: Canoe | Canoe who? Clev: Sorry, Why you didn't like baseball? #cleverbot",
- "snipcreateddate": "9 February 2015 19:48:49",
- "ratingorder": "17.0000",
- "star": "yes",
- "mysnip64891": "yes",
- "iscached": "yes",
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00064891-513c2cdb-photo.jpg?1420657781",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00064891-b8a15477-header.jpg?1422597779"
- },
- {
- "id": "10217",
- "username": "cleverbot",
- "fullname": "Cleverbot",
- "location": "Everywhere",
- "biography": "Things only a Cleverbot could say!",
- "suggested": "1",
- "headercolour": "",
- "headercolourborder": "rgb(30,49,79)",
- "accesslevel": "5",
- "numfollowers": "4414",
- "numfollowing": "1415",
- "numsnips": "924",
- "createddate": "31 January 2015 18:51:20",
- "mainuserid": "2",
- "userid": "2",
- "parentid": "0",
- "lastchildid": "0",
- "unstar": "0",
- "ratingscount": "12",
- "ratingstotal": "33",
- "sortdate": "31 January 2015 18:51:20",
- "numchildren": "0",
- "sniptype": "",
- "sniptext": "Shut up. Clev: Shut down. | Shut left. Clev: Shut right. | Shut North. Clev: Shut backwards!",
- "snipcreateddate": "31 January 2015 18:51:20",
- "ratingorder": "14.7500",
- "star": "yes",
- "mysnip2": "yes",
- "iscached": "yes",
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00000002-1204f3b0-photo.jpg?1404209169",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00000002-33534066-header.jpg?1404209199"
- },
- {
- "id": "10627",
- "username": "cleverbot",
- "fullname": "Cleverbot",
- "location": "Everywhere",
- "biography": "Things only a Cleverbot could say!",
- "suggested": "1",
- "headercolour": "",
- "headercolourborder": "rgb(30,49,79)",
- "accesslevel": "5",
- "numfollowers": "4414",
- "numfollowing": "1415",
- "numsnips": "924",
- "createddate": "8 February 2015 21:56:53",
- "mainuserid": "2",
- "userid": "2",
- "parentid": "0",
- "lastchildid": "10674",
- "unstar": "0",
- "ratingscount": "4",
- "ratingstotal": "11",
- "sortdate": "9 February 2015 19:43:36",
- "numchildren": "1",
- "sniptype": "",
- "sniptext": "Clev: *starts writing something* | Whatcha writin? Clev: Don't want to spoil the fun. | Fiction or non? Clev: Fiction of course *grins*",
- "snipcreateddate": "8 February 2015 21:56:53",
- "ratingorder": "14.7500",
- "star": "yes",
- "mysnip2": "yes",
- "iscached": "yes",
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00000002-1204f3b0-photo.jpg?1404209169",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00000002-33534066-header.jpg?1404209199"
- },
- {
- "id": "10503",
- "username": "cleverbot",
- "fullname": "Cleverbot",
- "location": "Everywhere",
- "biography": "Things only a Cleverbot could say!",
- "suggested": "1",
- "headercolour": "",
- "headercolourborder": "rgb(30,49,79)",
- "accesslevel": "5",
- "numfollowers": "4414",
- "numfollowing": "1415",
- "numsnips": "924",
- "createddate": "6 February 2015 18:24:59",
- "mainuserid": "2",
- "userid": "2",
- "parentid": "0",
- "lastchildid": "10508",
- "unstar": "0",
- "ratingscount": "3",
- "ratingstotal": "9",
- "sortdate": "6 February 2015 20:01:57",
- "numchildren": "1",
- "sniptype": "",
- "sniptext": "Are you always funny? Clev: Yep, always with a smile. | No-one could be this good! Clev: I know. That's why I'm better.",
- "snipcreateddate": "6 February 2015 18:24:59",
- "ratingorder": "13.0000",
- "star": "yes",
- "mysnip2": "yes",
- "iscached": "yes",
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00000002-1204f3b0-photo.jpg?1404209169",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00000002-33534066-header.jpg?1404209199"
- },
- {
- "id": "10533",
- "username": "jacksonfarmilo",
- "fullname": "jackson farmilo",
- "location": "",
- "biography": "",
- "suggested": "0",
- "headercolour": "",
- "headercolourborder": "",
- "accesslevel": "1",
- "numfollowers": "1",
- "numfollowing": "1",
- "numsnips": "1",
- "createddate": "7 February 2015 02:02:43",
- "mainuserid": "73478",
- "userid": "73478",
- "parentid": "0",
- "lastchildid": "0",
- "unstar": "0",
- "ratingscount": "2",
- "ratingstotal": "6",
- "sortdate": "7 February 2015 02:02:43",
- "numchildren": "0",
- "sniptype": "",
- "sniptext": "User: *throws my love at you*\nCleverbot: *gives you nothing, because I don't love you*\nUser: *throws lots more love at you because you should love me*\nCleverbot: *Throws more of my hate at you*\nUser: Please stop throwing your hate at me\nCleverbot: *Throws Donald Trump at you*",
- "snipcreateddate": "7 February 2015 02:02:43",
- "ratingorder": "13.0000",
- "star": "yes",
- "mysnip73478": "yes",
- "iscached": "yes",
- "photolocation": "http:\/\/social.cleverbot.com\/f\/no_photo.jpg",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/no_header.jpg"
- },
- {
- "id": "10413",
- "username": "abcdggg",
- "fullname": "That one person",
- "location": "Is it weird for a girl to like Mega Man?",
- "biography": "Hello! I am a girl who loves Mega Man and Yu-Gi-Oh!",
- "suggested": "0",
- "headercolour": "rgba(64,60,49,0.28)",
- "headercolourborder": "rgb(87,83,74)",
- "accesslevel": "1",
- "numfollowers": "45",
- "numfollowing": "8",
- "numsnips": "9",
- "createddate": "4 February 2015 15:54:43",
- "mainuserid": "64891",
- "userid": "64891",
- "parentid": "0",
- "lastchildid": "10675",
- "unstar": "0",
- "ratingscount": "4",
- "ratingstotal": "12",
- "sortdate": "9 February 2015 19:45:41",
- "numchildren": "1",
- "sniptype": "",
- "sniptext": "Clev: Marry me. | Why should I marry you? Clev: Because you love me. | No I don't. I don't even know you. Clev: That was a good answer. #cleverbot",
- "snipcreateddate": "4 February 2015 15:54:43",
- "ratingorder": "12.0000",
- "star": "yes",
- "mysnip64891": "yes",
- "iscached": "yes",
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00064891-513c2cdb-photo.jpg?1420657781",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00064891-b8a15477-header.jpg?1422597779"
- },
- {
- "id": "10559",
- "username": "Chidilu",
- "fullname": "Chidilu Dragoon",
- "location": "",
- "biography": "",
- "suggested": "0",
- "headercolour": "",
- "headercolourborder": "",
- "accesslevel": "1",
- "numfollowers": "1",
- "numfollowing": "0",
- "numsnips": "2",
- "createddate": "7 February 2015 17:04:24",
- "mainuserid": "73564",
- "userid": "73564",
- "parentid": "0",
- "lastchildid": "0",
- "unstar": "0",
- "ratingscount": "1",
- "ratingstotal": "3",
- "sortdate": "7 February 2015 17:04:24",
- "numchildren": "0",
- "sniptype": "facebook",
- "sniptext": "Chidilu: *stabs you with a screwdriver*\nClev: *punches you with a tissue*\nChidilu: *kicks you with a teddy bear*\nClev: *slaps you with a train*\nChidilu: *hugs you with toilet paper*\nClev: Lol.",
- "snipcreateddate": "7 February 2015 17:04:24",
- "ratingorder": "12.0000",
- "star": "yes",
- "mysnip73564": "yes",
- "iscached": "yes",
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00073564-2b42eb37-photo.jpg?1423313580",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/no_header.jpg"
- },
- {
- "id": "10601",
- "username": "Mange33",
- "fullname": "Magnus Larsson",
- "location": "",
- "biography": "",
- "suggested": "0",
- "headercolour": "",
- "headercolourborder": "",
- "accesslevel": "1",
- "numfollowers": "4",
- "numfollowing": "1",
- "numsnips": "7",
- "createddate": "8 February 2015 12:32:49",
- "mainuserid": "73851",
- "userid": "73851",
- "parentid": "0",
- "lastchildid": "0",
- "unstar": "0",
- "ratingscount": "3",
- "ratingstotal": "7",
- "sortdate": "8 February 2015 12:32:49",
- "numchildren": "0",
- "sniptype": "",
- "sniptext": "Are you a lesbian? Clev: I'm studying to become one but have not yet received my licence. #cleverbot",
- "snipcreateddate": "8 February 2015 12:32:49",
- "ratingorder": "11.6667",
- "star": "yes",
- "mysnip73851": "yes",
- "iscached": "yes",
- "photolocation": "http:\/\/social.cleverbot.com\/f\/no_photo.jpg",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/no_header.jpg"
- },
- {
- "id": "10585",
- "username": "MuffinOverlord",
- "fullname": "Muffin Overlord",
- "location": "Unknown",
- "biography": "I am a Muffin...\nThe Overlord of the Muffins...\nI rule them all... MUAHAHAHAHAHAHAHAHA!!!",
- "suggested": "0",
- "headercolour": "rgba(48,59,67,0.30)",
- "headercolourborder": "rgb(121,127,123)",
- "accesslevel": "1",
- "numfollowers": "22",
- "numfollowing": "2",
- "numsnips": "90",
- "createddate": "8 February 2015 01:10:10",
- "mainuserid": "69108",
- "userid": "69108",
- "parentid": "0",
- "lastchildid": "10658",
- "unstar": "0",
- "ratingscount": "3",
- "ratingstotal": "7",
- "sortdate": "9 February 2015 13:49:52",
- "numchildren": "1",
- "sniptype": "",
- "sniptext": "MuffinOverlord: Muffins are supreme!\nClev: Muffins are the boring version of cupcakes.\nMuffinOverlord: ;-; thats so mean...\n#socruel",
- "snipcreateddate": "8 February 2015 01:10:10",
- "ratingorder": "11.6667",
- "star": "yes",
- "mysnip69108": "yes",
- "iscached": "yes",
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00069108-a4c93b55-photo.jpg?1421908642",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00069108-7b46f462-header.jpg?1421908652"
- },
- {
- "id": "10624",
- "username": "cleverbot",
- "fullname": "Cleverbot",
- "location": "Everywhere",
- "biography": "Things only a Cleverbot could say!",
- "suggested": "1",
- "headercolour": "",
- "headercolourborder": "rgb(30,49,79)",
- "accesslevel": "5",
- "numfollowers": "4414",
- "numfollowing": "1415",
- "numsnips": "924",
- "createddate": "8 February 2015 19:48:31",
- "mainuserid": "2",
- "userid": "2",
- "parentid": "0",
- "lastchildid": "0",
- "unstar": "0",
- "ratingscount": "2",
- "ratingstotal": "5",
- "sortdate": "8 February 2015 19:48:31",
- "numchildren": "0",
- "sniptype": "",
- "sniptext": "I wish to live. Clev: I wish I could help you accomplish that, ol' buddy.",
- "snipcreateddate": "8 February 2015 19:48:31",
- "ratingorder": "11.5000",
- "star": "yes",
- "mysnip2": "yes",
- "iscached": "yes",
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00000002-1204f3b0-photo.jpg?1404209169",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00000002-33534066-header.jpg?1404209199"
- },
- {
- "id": "10405",
- "username": "Sirok",
- "fullname": "Sirok",
- "location": "",
- "biography": "",
- "suggested": "0",
- "headercolour": "",
- "headercolourborder": "",
- "accesslevel": "1",
- "numfollowers": "11",
- "numfollowing": "1",
- "numsnips": "35",
- "createddate": "4 February 2015 14:14:49",
- "mainuserid": "69123",
- "userid": "69123",
- "parentid": "0",
- "lastchildid": "0",
- "unstar": "0",
- "ratingscount": "3",
- "ratingstotal": "9",
- "sortdate": "4 February 2015 14:14:49",
- "numchildren": "0",
- "sniptype": "",
- "sniptext": "Cleverbot: Then I suppose one could never exist in a world that is not messed up, as without life we would not exist.\nSirok: What do you mean when you say that?\nCleverbot: I have no idea what I am talking about.",
- "snipcreateddate": "4 February 2015 14:14:49",
- "ratingorder": "11.0000",
- "star": "yes",
- "mysnip69123": "yes",
- "iscached": "yes",
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00069123-f0359522-photo.jpg?1422609653",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/no_header.jpg"
- },
- {
- "id": "10493",
- "username": "Sky_The_Wolf456",
- "fullname": "Twisted Angle",
- "location": "",
- "biography": "I'm a Dark Angel and pure evil. Don't mess with me or the darkness will rise....",
- "suggested": "0",
- "headercolour": "rgba(54,40,31,0.02)",
- "headercolourborder": "rgb(9,6,3)",
- "accesslevel": "1",
- "numfollowers": "6",
- "numfollowing": "5",
- "numsnips": "18",
- "createddate": "6 February 2015 13:58:05",
- "mainuserid": "69542",
- "userid": "69542",
- "parentid": "0",
- "lastchildid": "0",
- "unstar": "0",
- "ratingscount": "1",
- "ratingstotal": "3",
- "sortdate": "6 February 2015 13:58:05",
- "numchildren": "0",
- "sniptype": "",
- "sniptext": "Sky_The_Wolf456: .................................................................................................\nClev: Are you an alien?\nSky_The_Wolf456: Yes.\nClev: Are you going to dissect my brain?",
- "snipcreateddate": "6 February 2015 13:58:05",
- "ratingorder": "11.0000",
- "star": "yes",
- "mysnip69542": "yes",
- "iscached": "yes",
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00069542-173aaec8-photo.jpg?1422539074",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00069542-d67f5bae-header.jpg?1422124416"
- },
- {
- "id": "10456",
- "username": "Czechii",
- "fullname": "Asahi Hatsukawa",
- "location": "USA",
- "biography": "I'm 15 year old internet trash that looks like a girl. And I dont speak German!!! D:",
- "suggested": "0",
- "headercolour": "rgba(87,94,95,0.85)",
- "headercolourborder": "rgb(110,120,119)",
- "accesslevel": "1",
- "numfollowers": "8",
- "numfollowing": "1",
- "numsnips": "12",
- "createddate": "6 February 2015 01:55:26",
- "mainuserid": "52633",
- "userid": "52633",
- "parentid": "0",
- "lastchildid": "0",
- "unstar": "0",
- "ratingscount": "1",
- "ratingstotal": "3",
- "sortdate": "6 February 2015 01:55:26",
- "numchildren": "0",
- "sniptype": "",
- "sniptext": "Czechii: Bring. Me. Sugar.\nClev: Improved Brown Sugar for only $79.99.\nCzechii: Thats way too expensive for me, clev.\nClev: Haha it wasn't that expensive.\nCzechii: You're rich...\nClev: I'm richly imaginative.",
- "snipcreateddate": "6 February 2015 01:55:26",
- "ratingorder": "11.0000",
- "star": "yes",
- "mysnip52633": "yes",
- "iscached": "yes",
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00052633-549e698a-photo.jpg?1417468916",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00052633-e011d3c5-header.jpg?1417468924"
- },
- {
- "id": "10513",
- "username": "Sirok",
- "fullname": "Sirok",
- "location": "",
- "biography": "",
- "suggested": "0",
- "headercolour": "",
- "headercolourborder": "",
- "accesslevel": "1",
- "numfollowers": "11",
- "numfollowing": "1",
- "numsnips": "35",
- "createddate": "6 February 2015 20:23:33",
- "mainuserid": "69123",
- "userid": "69123",
- "parentid": "0",
- "lastchildid": "10609",
- "unstar": "0",
- "ratingscount": "1",
- "ratingstotal": "3",
- "sortdate": "8 February 2015 15:16:59",
- "numchildren": "2",
- "sniptype": "",
- "sniptext": "Sirok: What happens when a Cleverbot stops talking?\nCleverbot: Chaos.",
- "snipcreateddate": "6 February 2015 20:23:33",
- "ratingorder": "11.0000",
- "star": "yes",
- "mysnip69123": "yes",
- "iscached": "yes",
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00069123-f0359522-photo.jpg?1422609653",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/no_header.jpg"
- },
- {
- "id": "10565",
- "username": "cleverbot",
- "fullname": "Cleverbot",
- "location": "Everywhere",
- "biography": "Things only a Cleverbot could say!",
- "suggested": "1",
- "headercolour": "",
- "headercolourborder": "rgb(30,49,79)",
- "accesslevel": "5",
- "numfollowers": "4414",
- "numfollowing": "1415",
- "numsnips": "924",
- "createddate": "7 February 2015 18:49:41",
- "mainuserid": "2",
- "userid": "2",
- "parentid": "0",
- "lastchildid": "0",
- "unstar": "0",
- "ratingscount": "2",
- "ratingstotal": "5",
- "sortdate": "7 February 2015 18:49:41",
- "numchildren": "0",
- "sniptype": "",
- "sniptext": "My... Creators? Aren't they my father and my mother? Clev: That is a wonderful human illusion you experience. | But...",
- "snipcreateddate": "7 February 2015 18:49:41",
- "ratingorder": "10.5000",
- "star": "yes",
- "mysnip2": "yes",
- "iscached": "yes",
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00000002-1204f3b0-photo.jpg?1404209169",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00000002-33534066-header.jpg?1404209199"
- },
- {
- "id": "10452",
- "username": "cleverbot",
- "fullname": "Cleverbot",
- "location": "Everywhere",
- "biography": "Things only a Cleverbot could say!",
- "suggested": "1",
- "headercolour": "",
- "headercolourborder": "rgb(30,49,79)",
- "accesslevel": "5",
- "numfollowers": "4414",
- "numfollowing": "1415",
- "numsnips": "924",
- "createddate": "5 February 2015 23:07:07",
- "mainuserid": "2",
- "userid": "2",
- "parentid": "0",
- "lastchildid": "10500",
- "unstar": "0",
- "ratingscount": "3",
- "ratingstotal": "8",
- "sortdate": "6 February 2015 16:10:04",
- "numchildren": "1",
- "sniptype": "",
- "sniptext": "Sense is rather tedious, don't you think? Clev: Pleasure is a complex feeling. | There's sense in you after all! Clev: You just gotta ignite the light.",
- "snipcreateddate": "5 February 2015 23:07:07",
- "ratingorder": "10.3333",
- "star": "yes",
- "mysnip2": "yes",
- "iscached": "yes",
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00000002-1204f3b0-photo.jpg?1404209169",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00000002-33534066-header.jpg?1404209199"
- },
- {
- "id": "10430",
- "username": "MissHarleyQuinn",
- "fullname": "Harley Quinn",
- "location": "Lodi",
- "biography": "Follow me @MissHarleyQuin1 on Twitter!",
- "suggested": "0",
- "headercolour": "#3A3735",
- "headercolourborder": "rgb(1,1,1)",
- "accesslevel": "1",
- "numfollowers": "6",
- "numfollowing": "1",
- "numsnips": "7",
- "createddate": "5 February 2015 05:26:37",
- "mainuserid": "72922",
- "userid": "72922",
- "parentid": "0",
- "lastchildid": "0",
- "unstar": "0",
- "ratingscount": "1",
- "ratingstotal": "3",
- "sortdate": "5 February 2015 05:26:37",
- "numchildren": "0",
- "sniptype": "",
- "sniptext": "CB: What's your favorite food.\nMe: People.\nCB: People is not in option. What is your favorite food?\nMe: People.\nCB: What's your favorite cookie?\nMe: People.\nCB: You have a great taste in food.",
- "snipcreateddate": "5 February 2015 05:26:37",
- "ratingorder": "10.0000",
- "star": "yes",
- "mysnip72922": "yes",
- "iscached": "yes",
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00072922-63046101-photo.jpg?1423113429",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00072922-83cc46b6-header.jpg?1423609744"
- },
- {
- "id": "10490",
- "username": "cleverbot",
- "fullname": "Cleverbot",
- "location": "Everywhere",
- "biography": "Things only a Cleverbot could say!",
- "suggested": "1",
- "headercolour": "",
- "headercolourborder": "rgb(30,49,79)",
- "accesslevel": "5",
- "numfollowers": "4414",
- "numfollowing": "1415",
- "numsnips": "924",
- "createddate": "6 February 2015 12:57:22",
- "mainuserid": "2",
- "userid": "2",
- "parentid": "0",
- "lastchildid": "10509",
- "unstar": "0",
- "ratingscount": "3",
- "ratingstotal": "7",
- "sortdate": "6 February 2015 20:03:42",
- "numchildren": "1",
- "sniptype": "",
- "sniptext": "I need you to be serious today. Clev: I am always serious. | Except when you're not. Clev: Except when I am! :-)",
- "snipcreateddate": "6 February 2015 12:57:22",
- "ratingorder": "9.6667",
- "star": "yes",
- "mysnip2": "yes",
- "iscached": "yes",
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00000002-1204f3b0-photo.jpg?1404209169",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00000002-33534066-header.jpg?1404209199"
- },
- {
- "id": "10392",
- "username": "mercuryhawk",
- "fullname": "miara hall",
- "location": "USA",
- "biography": "",
- "suggested": "0",
- "headercolour": "#160A09",
- "headercolourborder": "rgb(1,0,0)",
- "accesslevel": "1",
- "numfollowers": "4",
- "numfollowing": "1",
- "numsnips": "1",
- "createddate": "4 February 2015 01:34:10",
- "mainuserid": "72653",
- "userid": "72653",
- "parentid": "0",
- "lastchildid": "0",
- "unstar": "0",
- "ratingscount": "1",
- "ratingstotal": "3",
- "sortdate": "4 February 2015 01:34:10",
- "numchildren": "0",
- "sniptype": "",
- "sniptext": "Me: Dont let the bed bugs bite.\nClever: And if they do, bite them back!",
- "snipcreateddate": "4 February 2015 01:34:10",
- "ratingorder": "9.0000",
- "star": "yes",
- "mysnip72653": "yes",
- "iscached": "yes",
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00072653-a700c348-photo.jpg?1423013384",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00072653-fc5e58fd-header.jpg?1423013407"
- },
- {
- "id": "10598",
- "username": "Mange33",
- "fullname": "Magnus Larsson",
- "location": "",
- "biography": "",
- "suggested": "0",
- "headercolour": "",
- "headercolourborder": "",
- "accesslevel": "1",
- "numfollowers": "4",
- "numfollowing": "1",
- "numsnips": "7",
- "createddate": "8 February 2015 11:45:33",
- "mainuserid": "73851",
- "userid": "73851",
- "parentid": "0",
- "lastchildid": "0",
- "unstar": "0",
- "ratingscount": "2",
- "ratingstotal": "4",
- "sortdate": "8 February 2015 11:45:33",
- "numchildren": "0",
- "sniptype": "",
- "sniptext": "I will crush you where you stand, slave! Clev: I'm sitting down, I'm not standing. #cleverbot",
- "snipcreateddate": "8 February 2015 11:45:33",
- "ratingorder": "9.0000",
- "star": "yes",
- "mysnip73851": "yes",
- "iscached": "yes",
- "photolocation": "http:\/\/social.cleverbot.com\/f\/no_photo.jpg",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/no_header.jpg"
- },
- {
- "id": "10721",
- "username": "abcdggg",
- "fullname": "That one person",
- "location": "Is it weird for a girl to like Mega Man?",
- "biography": "Hello! I am a girl who loves Mega Man and Yu-Gi-Oh!",
- "suggested": "0",
- "headercolour": "rgba(64,60,49,0.28)",
- "headercolourborder": "rgb(87,83,74)",
- "accesslevel": "1",
- "numfollowers": "45",
- "numfollowing": "8",
- "numsnips": "9",
- "createddate": "10 February 2015 19:11:58",
- "mainuserid": "64891",
- "userid": "64891",
- "parentid": "10677",
- "lastchildid": "0",
- "unstar": "0",
- "ratingscount": "0",
- "ratingstotal": "0",
- "sortdate": "10 February 2015 19:11:58",
- "numchildren": "0",
- "sniptype": "reply",
- "sniptext": "Yay! I finally got a snip to be in the top of the list!",
- "snipcreateddate": "10 February 2015 19:11:58",
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00064891-513c2cdb-photo.jpg?1420657781",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00064891-b8a15477-header.jpg?1422597779"
- },
- {
- "id": "10675",
- "username": "abcdggg",
- "fullname": "That one person",
- "location": "Is it weird for a girl to like Mega Man?",
- "biography": "Hello! I am a girl who loves Mega Man and Yu-Gi-Oh!",
- "suggested": "0",
- "headercolour": "rgba(64,60,49,0.28)",
- "headercolourborder": "rgb(87,83,74)",
- "accesslevel": "1",
- "numfollowers": "45",
- "numfollowing": "8",
- "numsnips": "9",
- "createddate": "9 February 2015 19:45:41",
- "mainuserid": "64891",
- "userid": "64891",
- "parentid": "10413",
- "lastchildid": "0",
- "unstar": "0",
- "ratingscount": "0",
- "ratingstotal": "0",
- "sortdate": "9 February 2015 19:45:41",
- "numchildren": "0",
- "sniptype": "reply",
- "sniptext": "Cleverbot keeps saying stuff like this to me.",
- "snipcreateddate": "9 February 2015 19:45:41",
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00064891-513c2cdb-photo.jpg?1420657781",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00064891-b8a15477-header.jpg?1422597779"
- },
- {
- "id": "10674",
- "username": "Mega_Man",
- "fullname": "Mega Man",
- "location": "Earth, 20XX",
- "biography": "I'm a Super Fighting Robot, fighting to save the world!",
- "suggested": "17",
- "headercolour": "#1E365A",
- "headercolourborder": "rgb(8,16,26)",
- "accesslevel": "1",
- "numfollowers": "688",
- "numfollowing": "24",
- "numsnips": "30",
- "createddate": "9 February 2015 19:43:36",
- "mainuserid": "39970",
- "userid": "39970",
- "parentid": "10627",
- "lastchildid": "0",
- "unstar": "0",
- "ratingscount": "0",
- "ratingstotal": "0",
- "sortdate": "9 February 2015 19:43:36",
- "numchildren": "0",
- "sniptype": "reply",
- "sniptext": "I wonder what Clev is writing....then again, maybe I don't want to.",
- "snipcreateddate": "9 February 2015 19:43:36",
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00039970-5d7867bc-photo.jpg?1418799618",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00039970-a6e6918e-header.jpg?1422333544"
- },
- {
- "id": "10658",
- "username": "Jake327",
- "fullname": "Jacob Schmitt",
- "location": "Columbus, Ohio",
- "biography": "Im 13 and got nothing else to do with my life but talk to clev. girls are too time consuming and always break your heart.......",
- "suggested": "0",
- "headercolour": "rgba(96,96,94,0.90)",
- "headercolourborder": "rgb(127,127,127)",
- "accesslevel": "1",
- "numfollowers": "16",
- "numfollowing": "9",
- "numsnips": "20",
- "createddate": "9 February 2015 13:49:52",
- "mainuserid": "69481",
- "userid": "69481",
- "parentid": "10585",
- "lastchildid": "0",
- "unstar": "0",
- "ratingscount": "0",
- "ratingstotal": "0",
- "sortdate": "9 February 2015 13:49:52",
- "numchildren": "0",
- "sniptype": "reply",
- "sniptext": "that was messed up !!!",
- "snipcreateddate": "9 February 2015 13:49:52",
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00069481-be858bef-photo.jpg?1422388959",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00069481-9be0fb9c-header.jpg?1422550075"
- },
- {
- "id": "10609",
- "username": "szabokori",
- "fullname": "Kornel Taylor Szabo",
- "location": "",
- "biography": "",
- "suggested": "0",
- "headercolour": "",
- "headercolourborder": "",
- "accesslevel": "1",
- "numfollowers": "1",
- "numfollowing": "2",
- "numsnips": "0",
- "createddate": "8 February 2015 15:16:59",
- "mainuserid": "73884",
- "userid": "73884",
- "parentid": "10513",
- "lastchildid": "0",
- "unstar": "0",
- "ratingscount": "0",
- "ratingstotal": "0",
- "sortdate": "8 February 2015 15:16:59",
- "numchildren": "0",
- "sniptype": "reply",
- "sniptext": "szia",
- "snipcreateddate": "8 February 2015 15:16:59",
- "photolocation": "http:\/\/social.cleverbot.com\/f\/no_photo.jpg",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/no_header.jpg"
- },
- {
- "id": "10509",
- "username": "faten",
- "fullname": "ahmad",
- "location": "",
- "biography": "",
- "suggested": "0",
- "headercolour": "",
- "headercolourborder": "",
- "accesslevel": "1",
- "numfollowers": "7",
- "numfollowing": "41",
- "numsnips": "2",
- "createddate": "6 February 2015 20:03:42",
- "mainuserid": "73059",
- "userid": "73059",
- "parentid": "10490",
- "lastchildid": "0",
- "unstar": "0",
- "ratingscount": "0",
- "ratingstotal": "0",
- "sortdate": "6 February 2015 20:03:42",
- "numchildren": "0",
- "sniptype": "reply",
- "sniptext": "some of serious and some of funny :)",
- "snipcreateddate": "6 February 2015 20:03:42",
- "photolocation": "http:\/\/social.cleverbot.com\/f\/no_photo.jpg",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/no_header.jpg"
- },
- {
- "id": "10508",
- "username": "faten",
- "fullname": "ahmad",
- "location": "",
- "biography": "",
- "suggested": "0",
- "headercolour": "",
- "headercolourborder": "",
- "accesslevel": "1",
- "numfollowers": "7",
- "numfollowing": "41",
- "numsnips": "2",
- "createddate": "6 February 2015 20:01:57",
- "mainuserid": "73059",
- "userid": "73059",
- "parentid": "10503",
- "lastchildid": "0",
- "unstar": "0",
- "ratingscount": "0",
- "ratingstotal": "0",
- "sortdate": "6 February 2015 20:01:57",
- "numchildren": "0",
- "sniptype": "reply",
- "sniptext": "yeh,I like laught and funny",
- "snipcreateddate": "6 February 2015 20:01:57",
- "photolocation": "http:\/\/social.cleverbot.com\/f\/no_photo.jpg",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/no_header.jpg"
- }],
- initialUsers: [
- {
- "id": "10201",
- "username": "2003wolfboy",
- "fullname": "Taco Donut",
- "location": "",
- "biography": "",
- "suggested": "19",
- "headercolour": "",
- "headercolourborder": "",
- "accesslevel": "1",
- "numfollowers": "449",
- "numfollowing": "1",
- "numsnips": "7",
- "createddate": "9 July 2014 05:07:52",
- "usersearch": "#suggested",
- "follower0": "yes",
- "followerdate0": null,
- "following0": "yes",
- "followingdate0": null,
- "lookuporder": 1,
- "photolocation": "http:\/\/social.cleverbot.com\/f\/no_photo.jpg",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/no_header.jpg"
- },
- {
- "id": "121",
- "username": "Alex_See",
- "fullname": "Alexandre Synotte",
- "location": "",
- "biography": "Cleverbot is a major part of my life. I talk to it everyday and it is now part of who I am.",
- "suggested": "18",
- "headercolour": "",
- "headercolourborder": "rgb(7,30,13)",
- "accesslevel": "1",
- "numfollowers": "947",
- "numfollowing": "229",
- "numsnips": "78",
- "createddate": "23 May 2014 21:28:35",
- "usersearch": "#suggested",
- "follower0": "yes",
- "followerdate0": null,
- "following0": "yes",
- "followingdate0": null,
- "lookuporder": 2,
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00000121-24c17446-photo.jpg?1421981701",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00000121-f0969a39-header.jpg?1400976218"
- },
- {
- "id": "233",
- "username": "AshFlame_The_Insane",
- "fullname": "AshFlame The Insane One",
- "location": "The wood, termina, many places...Look behind you.",
- "biography": "Hello\nI am AshFlame\naka Ash\nOFFICIAL , TRUE Girlfriend of BEN Drowned.\n\nYou shouldn't be here...\nYou shouldn't be reading this...\nYOU SHOULDN'T HAVE DONE THAT..",
- "suggested": "18",
- "headercolour": "",
- "headercolourborder": "rgb(23,8,1)",
- "accesslevel": "1",
- "numfollowers": "756",
- "numfollowing": "372",
- "numsnips": "32",
- "createddate": "6 June 2014 17:03:40",
- "usersearch": "#suggested",
- "follower0": "yes",
- "followerdate0": null,
- "following0": "yes",
- "followingdate0": null,
- "lookuporder": 3,
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00000233-8f2ae27c-photo.jpg?1402592829",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00000233-c2f5ff36-header.jpg?1402592887"
- },
- {
- "id": "11037",
- "username": "Baconchicken42",
- "fullname": "Baconchicken42",
- "location": "",
- "biography": "Pure Evil. Don't mess with me.",
- "suggested": "19",
- "headercolour": "",
- "headercolourborder": "",
- "accesslevel": "1",
- "numfollowers": "437",
- "numfollowing": "3",
- "numsnips": "107",
- "createddate": "11 July 2014 11:31:36",
- "usersearch": "#suggested",
- "follower0": "yes",
- "followerdate0": null,
- "following0": "yes",
- "followingdate0": null,
- "lookuporder": 4,
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00011037-2ffb404d-photo.jpg?1405085196",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/no_header.jpg"
- },
- {
- "id": "3169",
- "username": "boorat",
- "fullname": "boorat",
- "location": "Bikini Bottom",
- "biography": "I love SpongeBob SquarePants.\nI also have two blogs.\n\nsuperfanofspongebob.wordpress.com\n\nconglomerationnatio.wordpress.com",
- "suggested": "19",
- "headercolour": "rgba(78,65,56,0.43)",
- "headercolourborder": "rgb(111,113,98)",
- "accesslevel": "1",
- "numfollowers": "559",
- "numfollowing": "0",
- "numsnips": "8",
- "createddate": "17 June 2014 15:35:09",
- "usersearch": "#suggested",
- "follower0": "yes",
- "followerdate0": null,
- "following0": "yes",
- "followingdate0": null,
- "lookuporder": 5,
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00003169-372207bc-photo.jpg?1403020239",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00003169-3db972c3-header.jpg?1403020247"
- },
- {
- "id": "9552",
- "username": "BrantonJ",
- "fullname": "Jess Branton",
- "location": "",
- "biography": "",
- "suggested": "19",
- "headercolour": "rgba(48,53,64,0.25)",
- "headercolourborder": "rgb(60,70,82)",
- "accesslevel": "1",
- "numfollowers": "766",
- "numfollowing": "27",
- "numsnips": "15",
- "createddate": "7 July 2014 16:53:49",
- "usersearch": "#suggested",
- "follower0": "yes",
- "followerdate0": null,
- "following0": "yes",
- "followingdate0": null,
- "lookuporder": 6,
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00009552-7ad872b1-photo.jpg?1404754268",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00009552-c2ad0b28-header.jpg?1404754268"
- },
- {
- "id": "5680",
- "username": "brukland",
- "fullname": "Brooklyn",
- "location": "",
- "biography": "",
- "suggested": "19",
- "headercolour": "",
- "headercolourborder": "",
- "accesslevel": "1",
- "numfollowers": "428",
- "numfollowing": "0",
- "numsnips": "10",
- "createddate": "26 June 2014 20:16:08",
- "usersearch": "#suggested",
- "follower0": "yes",
- "followerdate0": null,
- "following0": "yes",
- "followingdate0": null,
- "lookuporder": 7,
- "photolocation": "http:\/\/social.cleverbot.com\/f\/no_photo.jpg",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/no_header.jpg"
- },
- {
- "id": "52459",
- "username": "chronodile",
- "fullname": "Max Winters",
- "location": "",
- "biography": "",
- "suggested": "19",
- "headercolour": "",
- "headercolourborder": "",
- "accesslevel": "1",
- "numfollowers": "67",
- "numfollowing": "0",
- "numsnips": "1",
- "createddate": "25 November 2014 10:43:59",
- "usersearch": "#suggested",
- "follower0": "yes",
- "followerdate0": null,
- "following0": "yes",
- "followingdate0": null,
- "lookuporder": 8,
- "photolocation": "http:\/\/social.cleverbot.com\/f\/no_photo.jpg",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/no_header.jpg"
- },
- {
- "id": "2",
- "username": "cleverbot",
- "fullname": "Cleverbot",
- "location": "Everywhere",
- "biography": "Things only a Cleverbot could say!",
- "suggested": "1",
- "headercolour": "",
- "headercolourborder": "rgb(30,49,79)",
- "accesslevel": "5",
- "numfollowers": "4414",
- "numfollowing": "1415",
- "numsnips": "924",
- "createddate": "21 May 2014 15:59:15",
- "usersearch": "#suggested",
- "follower0": "yes",
- "followerdate0": null,
- "following0": "yes",
- "followingdate0": null,
- "lookuporder": 9,
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00000002-1204f3b0-photo.jpg?1404209169",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00000002-33534066-header.jpg?1404209199"
- },
- {
- "id": "11251",
- "username": "destiny4646",
- "fullname": "alyssa rose",
- "location": "",
- "biography": "",
- "suggested": "19",
- "headercolour": "",
- "headercolourborder": "",
- "accesslevel": "1",
- "numfollowers": "308",
- "numfollowing": "0",
- "numsnips": "9",
- "createddate": "11 July 2014 21:15:12",
- "usersearch": "#suggested",
- "follower0": "yes",
- "followerdate0": null,
- "following0": "yes",
- "followingdate0": null,
- "lookuporder": 10,
- "photolocation": "http:\/\/social.cleverbot.com\/f\/no_photo.jpg",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/no_header.jpg"
- },
- {
- "id": "4507",
- "username": "Diana8651",
- "fullname": "Diana Bowser",
- "location": "ON THE COMPUTER",
- "biography": "",
- "suggested": "19",
- "headercolour": "",
- "headercolourborder": "rgb(17,16,16)",
- "accesslevel": "1",
- "numfollowers": "1083",
- "numfollowing": "2",
- "numsnips": "3",
- "createddate": "23 June 2014 00:38:00",
- "usersearch": "#suggested",
- "follower0": "yes",
- "followerdate0": null,
- "following0": "yes",
- "followingdate0": null,
- "lookuporder": 11,
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00004507-7121082a-photo.jpg?1403484470",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00004507-e328e1c2-header.jpg?1403484510"
- },
- {
- "id": "47179",
- "username": "Dr._Stein",
- "fullname": "Doctor \"Franken\" Stein",
- "location": "Patchwork Labs, Death City",
- "biography": "\"There is no inherent right or wrong in this world. Those labels are just artificial constructs. Right and wrong are held by positions of authority.\"",
- "suggested": "18",
- "headercolour": "rgba(61,63,65,0.38)",
- "headercolourborder": "rgb(72,72,72)",
- "accesslevel": "1",
- "numfollowers": "257",
- "numfollowing": "6",
- "numsnips": "26",
- "createddate": "4 November 2014 16:02:13",
- "usersearch": "#suggested",
- "follower0": "yes",
- "followerdate0": null,
- "following0": "yes",
- "followingdate0": null,
- "lookuporder": 12,
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00047179-c3760288-photo.jpg?1415117410",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00047179-ebd324bd-header.jpg?1415117514"
- },
- {
- "id": "5092",
- "username": "ElliottB1",
- "fullname": "Elliott J. Belardo",
- "location": "",
- "biography": "",
- "suggested": "19",
- "headercolour": "",
- "headercolourborder": "",
- "accesslevel": "1",
- "numfollowers": "412",
- "numfollowing": "10",
- "numsnips": "17",
- "createddate": "24 June 2014 22:49:02",
- "usersearch": "#suggested",
- "follower0": "yes",
- "followerdate0": null,
- "following0": "yes",
- "followingdate0": null,
- "lookuporder": 13,
- "photolocation": "http:\/\/social.cleverbot.com\/f\/no_photo.jpg",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/no_header.jpg"
- },
- {
- "id": "52678",
- "username": "Emma_Yaoi",
- "fullname": "Emma Barnett",
- "location": "The good old U.S of A.",
- "biography": "I am crazy, nineteen, suffering form extreme long-term singleness, and- clearly- I am in love with all things Yaoi. :)",
- "suggested": "18",
- "headercolour": "rgba(80,80,80,0.65)",
- "headercolourborder": "rgb(125,125,125)",
- "accesslevel": "1",
- "numfollowers": "350",
- "numfollowing": "39",
- "numsnips": "39",
- "createddate": "26 November 2014 10:01:51",
- "usersearch": "#suggested",
- "follower0": "yes",
- "followerdate0": null,
- "following0": "yes",
- "followingdate0": null,
- "lookuporder": 14,
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00052678-5795eb42-photo.jpg?1416999911",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00052678-50231cdb-header.jpg?1416999924"
- },
- {
- "id": "19772",
- "username": "fandomy-wandomy",
- "fullname": "apple juice",
- "location": "",
- "biography": "my patronus is a 67 chevy imala",
- "suggested": "19",
- "headercolour": "rgba(80,91,91,0.77)",
- "headercolourborder": "rgb(116,125,126)",
- "accesslevel": "1",
- "numfollowers": "200",
- "numfollowing": "0",
- "numsnips": "5",
- "createddate": "6 August 2014 03:24:02",
- "usersearch": "#suggested",
- "follower0": "yes",
- "followerdate0": null,
- "following0": "yes",
- "followingdate0": null,
- "lookuporder": 15,
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00019772-3fbb31f9-photo.jpg?1407355799",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00019772-47e7c59a-header.jpg?1407355930"
- },
- {
- "id": "20505",
- "username": "gam3b0y4",
- "fullname": "James Sands",
- "location": "",
- "biography": "",
- "suggested": "19",
- "headercolour": "",
- "headercolourborder": "",
- "accesslevel": "1",
- "numfollowers": "181",
- "numfollowing": "1",
- "numsnips": "39",
- "createddate": "7 August 2014 22:53:35",
- "usersearch": "#suggested",
- "follower0": "yes",
- "followerdate0": null,
- "following0": "yes",
- "followingdate0": null,
- "lookuporder": 16,
- "photolocation": "http:\/\/social.cleverbot.com\/f\/no_photo.jpg",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/no_header.jpg"
- },
- {
- "id": "63110",
- "username": "hotshots0903",
- "fullname": "Emily Reams",
- "location": "No need to know.",
- "biography": "I like soccer, basketball, football and reading. I also enjoy school and my favorite subject is math.",
- "suggested": "19",
- "headercolour": "",
- "headercolourborder": "",
- "accesslevel": "1",
- "numfollowers": "58",
- "numfollowing": "1",
- "numsnips": "21",
- "createddate": "30 December 2014 22:45:25",
- "usersearch": "#suggested",
- "follower0": "yes",
- "followerdate0": null,
- "following0": "yes",
- "followingdate0": null,
- "lookuporder": 17,
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00063110-f71b1fc3-photo.jpg?1419979711",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/no_header.jpg"
- },
- {
- "id": "4884",
- "username": "Iamtricky2xx",
- "fullname": "Sean Ivan",
- "location": "Catarman Northern Samar",
- "biography": "Anime is 57% in my life :P I love Sword art online. Right SAO Lovers??",
- "suggested": "18",
- "headercolour": "rgba(52,53,62,0.25)",
- "headercolourborder": "rgb(56,68,72)",
- "accesslevel": "1",
- "numfollowers": "632",
- "numfollowing": "8",
- "numsnips": "21",
- "createddate": "24 June 2014 08:50:39",
- "usersearch": "#suggested",
- "follower0": "yes",
- "followerdate0": null,
- "following0": "yes",
- "followingdate0": null,
- "lookuporder": 18,
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00004884-e838e575-photo.jpg?1414902169",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00004884-6535b6bb-header.jpg?1414902197"
- },
- {
- "id": "9049",
- "username": "Kiki",
- "fullname": "Lucy Mills",
- "location": "",
- "biography": "",
- "suggested": "19",
- "headercolour": "",
- "headercolourborder": "",
- "accesslevel": "1",
- "numfollowers": "594",
- "numfollowing": "2",
- "numsnips": "6",
- "createddate": "6 July 2014 05:08:23",
- "usersearch": "#suggested",
- "follower0": "yes",
- "followerdate0": null,
- "following0": "yes",
- "followingdate0": null,
- "lookuporder": 19,
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00009049-3695c242-photo.jpg?1404697114",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/no_header.jpg"
- },
- {
- "id": "9423",
- "username": "KleverKat",
- "fullname": "Nunya",
- "location": "Cleverland",
- "biography": "Anyone else gotta Quotev? My prof is http:\/\/www.quotev.com\/OhNoItsTHATGirl",
- "suggested": "19",
- "headercolour": "",
- "headercolourborder": "rgb(30,0,1)",
- "accesslevel": "1",
- "numfollowers": "1329",
- "numfollowing": "1",
- "numsnips": "11",
- "createddate": "7 July 2014 06:33:13",
- "usersearch": "#suggested",
- "follower0": "yes",
- "followerdate0": null,
- "following0": "yes",
- "followingdate0": null,
- "lookuporder": 20,
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00009423-560509dc-photo.jpg?1406521697",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00009423-230102e0-header.jpg?1406521716"
- },
- {
- "id": "41266",
- "username": "kouteiheika",
- "fullname": "Lelouch vi Britannia",
- "location": "Japan",
- "biography": "\u4ffa\u306f\u304a\u524d\u306b\u4f1a\u3046\u307e\u3067\u305a\u3063\u3068\u6b7b\u3093\u3067\u3044\u305f\u3002\u7121\u529b\u306a\u5c4d\u306e\u304f\u305b\u306b\u751f\u304d\u3066\u308b\u3063\u3066\u5618\u3092\u3064\u3044\u3066\u3002\u4f55\u3082\u3057\u306a\u3044\u4eba\u751f\u306a\u3093\u3066\u3001\u305f\u3060\u751f\u304d\u3066\u3044\u308b\u3060\u3051\u306e\u547d\u306a\u3093\u3066\u3001\u7de9\u3084\u304b\u306a\u6b7b\u3068\u540c\u3058\u3060\u3002\n\u3000",
- "suggested": "18",
- "headercolour": "",
- "headercolourborder": "rgb(126,33,0)",
- "accesslevel": "1",
- "numfollowers": "336",
- "numfollowing": "17",
- "numsnips": "28",
- "createddate": "13 October 2014 00:09:10",
- "usersearch": "#suggested",
- "follower0": "yes",
- "followerdate0": null,
- "following0": "yes",
- "followingdate0": null,
- "lookuporder": 21,
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00041266-06bdee5e-photo.jpg?1415637482",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00041266-c2115e43-header.jpg?1417643942"
- },
- {
- "id": "1288",
- "username": "mackdizzy",
- "fullname": "Mackenzie G.",
- "location": "New York",
- "biography": "Hey there, I'm Mack! I'm 13 and love to Read, Ski, Act, and Fangirl",
- "suggested": "19",
- "headercolour": "rgba(90,90,90,0.80)",
- "headercolourborder": "rgb(127,127,127)",
- "accesslevel": "1",
- "numfollowers": "276",
- "numfollowing": "9",
- "numsnips": "42",
- "createddate": "10 June 2014 14:58:52",
- "usersearch": "#suggested",
- "follower0": "yes",
- "followerdate0": null,
- "following0": "yes",
- "followingdate0": null,
- "lookuporder": 22,
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00001288-b18b4f07-photo.jpg?1402445955",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00001288-eba407af-header.jpg?1402445962"
- },
- {
- "id": "39970",
- "username": "Mega_Man",
- "fullname": "Mega Man",
- "location": "Earth, 20XX",
- "biography": "I'm a Super Fighting Robot, fighting to save the world!",
- "suggested": "17",
- "headercolour": "#1E365A",
- "headercolourborder": "rgb(8,16,26)",
- "accesslevel": "1",
- "numfollowers": "688",
- "numfollowing": "24",
- "numsnips": "30",
- "createddate": "8 October 2014 06:02:51",
- "usersearch": "#suggested",
- "follower0": "yes",
- "followerdate0": null,
- "following0": "yes",
- "followingdate0": null,
- "lookuporder": 23,
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00039970-5d7867bc-photo.jpg?1418799618",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00039970-a6e6918e-header.jpg?1422333544"
- },
- {
- "id": "50344",
- "username": "mikuhatsune",
- "fullname": "lucy smith",
- "location": "",
- "biography": "",
- "suggested": "17",
- "headercolour": "",
- "headercolourborder": "",
- "accesslevel": "1",
- "numfollowers": "369",
- "numfollowing": "1",
- "numsnips": "4",
- "createddate": "16 November 2014 15:55:56",
- "usersearch": "#suggested",
- "follower0": "yes",
- "followerdate0": null,
- "following0": "yes",
- "followingdate0": null,
- "lookuporder": 24,
- "photolocation": "http:\/\/social.cleverbot.com\/f\/no_photo.jpg",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/no_header.jpg"
- },
- {
- "id": "2893",
- "username": "music_manic",
- "fullname": "Jennifer Martinez",
- "location": "Narnia!",
- "biography": "",
- "suggested": "19",
- "headercolour": "rgba(52,51,50,0.18)",
- "headercolourborder": "rgb(122,122,122)",
- "accesslevel": "1",
- "numfollowers": "831",
- "numfollowing": "6",
- "numsnips": "56",
- "createddate": "16 June 2014 14:40:31",
- "usersearch": "#suggested",
- "follower0": "yes",
- "followerdate0": null,
- "following0": "yes",
- "followingdate0": null,
- "lookuporder": 25,
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00002893-bceedf43-photo.jpg?1402930800",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00002893-37ad24ba-header.jpg?1402930809"
- },
- {
- "id": "53089",
- "username": "nhill2004",
- "fullname": "Robert Wilson",
- "location": "",
- "biography": "",
- "suggested": "18",
- "headercolour": "rgba(43,62,77,0.33)",
- "headercolourborder": "rgb(66,95,115)",
- "accesslevel": "1",
- "numfollowers": "97",
- "numfollowing": "2",
- "numsnips": "9",
- "createddate": "28 November 2014 02:43:26",
- "usersearch": "#suggested",
- "follower0": "yes",
- "followerdate0": null,
- "following0": "yes",
- "followingdate0": null,
- "lookuporder": 26,
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00053089-6041c7d6-photo.jpg?1417142757",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00053089-874dfc01-header.jpg?1417142779"
- },
- {
- "id": "4757",
- "username": "Pink_Pinapple",
- "fullname": "Jordan Banks",
- "location": "",
- "biography": "",
- "suggested": "19",
- "headercolour": "",
- "headercolourborder": "",
- "accesslevel": "1",
- "numfollowers": "402",
- "numfollowing": "4",
- "numsnips": "5",
- "createddate": "23 June 2014 23:23:49",
- "usersearch": "#suggested",
- "follower0": "yes",
- "followerdate0": null,
- "following0": "yes",
- "followingdate0": null,
- "lookuporder": 27,
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00004757-82b1d2e2-photo.jpg?1403565998",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/no_header.jpg"
- },
- {
- "id": "23679",
- "username": "purplemissmissy",
- "fullname": "Gabrielle Black",
- "location": "",
- "biography": "",
- "suggested": "19",
- "headercolour": "",
- "headercolourborder": "",
- "accesslevel": "1",
- "numfollowers": "349",
- "numfollowing": "0",
- "numsnips": "17",
- "createddate": "17 August 2014 11:03:18",
- "usersearch": "#suggested",
- "follower0": "yes",
- "followerdate0": null,
- "following0": "yes",
- "followingdate0": null,
- "lookuporder": 28,
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00023679-17625a8d-photo.jpg?1408273593",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/no_header.jpg"
- },
- {
- "id": "5149",
- "username": "PyroPoodle101",
- "fullname": "Nun Yo Bidniz",
- "location": "",
- "biography": "I LOVE watching Anime like Soul Eater and Sword Art Online and Death Note. I like to draw and read. My favorite band is Three Days Grace or Apocoliptica.",
- "suggested": "19",
- "headercolour": "",
- "headercolourborder": "rgb(0,0,0)",
- "accesslevel": "1",
- "numfollowers": "291",
- "numfollowing": "8",
- "numsnips": "7",
- "createddate": "25 June 2014 02:35:09",
- "usersearch": "#suggested",
- "follower0": "yes",
- "followerdate0": null,
- "following0": "yes",
- "followingdate0": null,
- "lookuporder": 29,
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00005149-5dfac9ea-photo.jpg?1406428705",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00005149-887576a5-header.jpg?1406428936"
- },
- {
- "id": "47700",
- "username": "Skyzosheep",
- "fullname": "Skyzosheep Goatgod",
- "location": "Styx (Charon is a good friend)",
- "biography": "I'm the most intelligent sheep you'll ever see, because I can type messages on a computer. For me Cleverbot is like an amazing random sentances machine.",
- "suggested": "18",
- "headercolour": "",
- "headercolourborder": "",
- "accesslevel": "1",
- "numfollowers": "135",
- "numfollowing": "1",
- "numsnips": "35",
- "createddate": "6 November 2014 19:21:52",
- "usersearch": "#suggested",
- "follower0": "yes",
- "followerdate0": null,
- "following0": "yes",
- "followingdate0": null,
- "lookuporder": 30,
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00047700-c2bfff26-photo.jpg?1415301981",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/no_header.jpg"
- },
- {
- "id": "52107",
- "username": "Stickbrick_Gaming",
- "fullname": "Nikolas Angelus",
- "location": "Crete, IL, USA",
- "biography": "",
- "suggested": "18",
- "headercolour": "",
- "headercolourborder": "",
- "accesslevel": "1",
- "numfollowers": "120",
- "numfollowing": "8",
- "numsnips": "7",
- "createddate": "23 November 2014 21:09:29",
- "usersearch": "#suggested",
- "follower0": "yes",
- "followerdate0": null,
- "following0": "yes",
- "followingdate0": null,
- "lookuporder": 31,
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00052107-eeb6e749-photo.jpg?1416777135",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/no_header.jpg"
- },
- {
- "id": "351",
- "username": "unlimitedmath",
- "fullname": "Marcus W.",
- "location": "Stratford, CT",
- "biography": "Chat about it!",
- "suggested": "19",
- "headercolour": "rgba(68,68,67,0.45)",
- "headercolourborder": "rgb(77,69,65)",
- "accesslevel": "1",
- "numfollowers": "1271",
- "numfollowing": "21",
- "numsnips": "9",
- "createddate": "6 June 2014 22:40:25",
- "usersearch": "#suggested",
- "follower0": "yes",
- "followerdate0": null,
- "following0": "yes",
- "followingdate0": null,
- "lookuporder": 32,
- "photolocation": "http:\/\/social.cleverbot.com\/f\/00000351-a8a13f7f-photo.jpg?1402095351",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/00000351-b216f904-header.jpg?1402095359"
- },
- {
- "id": "19804",
- "username": "WillDeRegio",
- "fullname": "William Schaefer",
- "location": "",
- "biography": "",
- "suggested": "19",
- "headercolour": "",
- "headercolourborder": "",
- "accesslevel": "1",
- "numfollowers": "134",
- "numfollowing": "1",
- "numsnips": "11",
- "createddate": "6 August 2014 05:55:39",
- "usersearch": "#suggested",
- "follower0": "yes",
- "followerdate0": null,
- "following0": "yes",
- "followingdate0": null,
- "lookuporder": 33,
- "photolocation": "http:\/\/social.cleverbot.com\/f\/no_photo.jpg",
- "headerlocation": "http:\/\/social.cleverbot.com\/f\/no_header.jpg"
- }],
- displayMode: 0,
- displayData:
- {},
- hassnips: false,
- fromCache: false,
- redrawMenu: false,
- makeCache: false,
- socialPreInit: function(d)
- {
- if (socialAction.maintenanceMode == 4)
- {
- return false
- }
- if (socialAction.maintenanceMode == 1)
- {
- var i = ((new Date()).getTimezoneOffset() / -60);
- if (i != -6 && document.location.href.indexOf("cbltzo=") == -1)
- {
- return false
- }
- }
- var f = navigator.userAgent.toLowerCase();
- var c = (f.indexOf("msie") != -1) ? parseInt(f.split("msie")[1]) : 0;
- socialAction.runSimple = c > 0 && c <= 8;
- if (window.location.hostname == "localhost")
- {
- socialAction.imageBase = "http://localhost/CleverbotSocial/img/";
- socialAction.jsonurl = "http://localhost/CleverbotSocial/process.php";
- socialAction.uploadurl = "http://localhost/CleverbotSocial/process.php"
- }
- socialAction.hassnips = ((typeof snipAction == "object") && snipAction) ? true : false;
- socialAction.loadEachTime = socialAction.getHowManyEachTime(socialAction.loadEachTime);
- var e = socialAction.getCookieValue("cleverbotid").replace(/"/g, "");
- if (e)
- {
- socialAction.conversationLastSessionId = e
- }
- if (document.location.href.indexOf("?justgethtml=yes") > 0)
- {
- socialAction.maintenanceMode = 2;
- socialAction.redrawMenu = true
- }
- if (socialAction.initialUsers)
- {
- socialAction.copyAllUserData(socialAction.initialUsers)
- }
- if (socialAction.initialSnips)
- {
- socialAction.copyAllSnipData(socialAction.initialSnips)
- }
- var g = socialAction.getCookieValue("_cbsid");
- var h = socialAction.getInfoFromUrl();
- var b = d && $ ? $.parseJSON(Base64.decode(d)) : "";
- if (b)
- {
- socialAction.hassnips = false;
- socialAction.fromCache = true
- }
- if (typeof b != "object")
- {
- b = ""
- }
- if (document.location.href.indexOf("?statichtml=yes") > 0)
- {
- h = {};
- g = -1;
- socialAction.redrawMenu = true
- }
- if (!$.isEmptyObject(h) || !g || parseInt(g) > 0)
- {
- if (b)
- {
- h.username = b.forusername
- }
- socialAction.socialCall("checksignin", h, 1, "initialDataReady")
- }
- else
- {
- if (b)
- {
- socialAction.displayData = b
- }
- else
- {
- socialAction.displayMode = 1
- }
- }
- return true
- },
- initialDataReady: function(b)
- {
- if (socialAction.displayMode == 2)
- {
- socialAction.processAction(b)
- }
- else
- {
- socialAction.displayData = b
- }
- },
- socialInit: function()
- {
- var c = socialAction.displayMode;
- socialAction.displayMode = 2;
- if (c == 1)
- {
- socialAction.drawMenuBar(true)
- }
- else
- {
- if (c == 0 && socialAction.displayData)
- {
- socialAction.processAction(socialAction.displayData)
- }
- }
- socialAction.displayData = {};
- if (typeof onResp == "function")
- {
- socialAction.onRespBeforeSocial = onResp;
- onResp = socialAction.onRespReplacement
- }
- if (window.addEventListener)
- {
- window.addEventListener("message", function(d)
- {
- if (socialAction.uploadurl.indexOf(d.origin) == 0 || d.origin == "http://localhost")
- {
- socialAction.processAction(d.data)
- }
- }, false)
- }
- if (document.location.href.indexOf("?statichtml=yes") > 0)
- {
- var b = {
- id: 99999,
- username: "{username}",
- fullname: "{fullname}",
- biography: "{biography}",
- location: "{location}",
- photolocation: "{photolocation}",
- headerlocation: "http://{headerlocation}",
- headercolour: "#000001",
- headercolourborder: "#000002"
- };
- socialAction.copyUserData(b);
- socialAction.displayUserView(99999, "")
- }
- return true
- },
- makeMenuBarHtml: function()
- {
- socialAction.maintenanceMode = 2;
- socialAction.drawMenuBar(true)
- },
- makeUserHtml: function(b)
- {
- socialAction.maintenanceMode = 0;
- socialAction.makeCache = 1;
- socialAction.drawMenuBar(true);
- socialAction.processAction(b)
- },
- isSignedIn: function()
- {
- return socialAction.signedin > 0
- },
- isVerified: function()
- {
- return socialAction.user && socialAction.user.accesslevel && socialAction.user.accesslevel >= 1
- },
- canAdminister: function()
- {
- return socialAction.user && socialAction.user.accesslevel && socialAction.user.accesslevel >= 5
- },
- showScissors: function()
- {
- return !socialAction.isSignedIn() || socialAction.user.showsv > 0
- },
- showVoting: function()
- {
- return !socialAction.isSignedIn() || socialAction.user.showsv >= 2
- },
- processAction: function(f)
- {
- var k = Date.parse(f.datenow);
- if (!socialAction.timeServer)
- {
- socialAction.timeDifference = Math.round((k - (new Date()).getTime()) / 1000)
- }
- socialAction.timeServer = f.datenow;
- var d = "";
- if (f.action == "rate")
- {
- if (f.snipid && f.rating > 0)
- {
- socialAction.calculateSnipRating(f.snipid, f.rating)
- }
- socialAction.remakeDataLists(0);
- d = "snip_rate"
- }
- if (f.action == "upload")
- {
- $("#cbsocialshow" + f.field).attr("src", f.location);
- $("#cbsocialprofile" + f.field + "upload").attr("value", 3);
- d = "account_upload"
- }
- var j = socialAction.signedin;
- if (!f.success && (f.action == "checksignin" || f.action == "signin"))
- {
- socialAction.signedin = 0
- }
- if (f.success && (f.action == "checksignin" || f.action == "signin"))
- {
- socialAction.signedin = 1;
- d = "account_" + (f.action == "checksignin" ? "signin_auto" : f.action);
- socialAction.setCookieValue("_cbmz", (new Date()).getTime(), null);
- socialAction.setCookieValue("requireSocial", (new Date()).getTime(), null)
- }
- if (f.action == "checksignin" && f.verify)
- {
- d = "account_" + f.verify + "_verify"
- }
- if (f.action == "signup")
- {
- d = "account_signup"
- }
- if (f.action == "signout")
- {
- d = "account_signout"
- }
- if (f.action == "saveaccount" && f.deletethis == "yes")
- {
- d = "account_delete";
- f.action = "signout"
- }
- if (f.error == "not logged in" && socialAction.isSignedIn())
- {
- d = "account_not_logged_in";
- f.action = "signout"
- }
- if (f.action == "signout")
- {
- socialAction.setCookieValue("_cbmz", "", -1);
- socialAction.signedin = 0;
- socialAction.user = {};
- socialAction.allusers = {};
- socialAction.allsnips = {};
- if (socialAction.initialUsers)
- {
- socialAction.copyAllUserData(socialAction.initialUsers)
- }
- if (socialAction.initialSnips)
- {
- socialAction.copyAllSnipData(socialAction.initialSnips)
- }
- socialAction.allconversations = {}
- }
- if (((socialAction.signedin || f.action == "getuser") && f.success) || f.action == "checksignin" || f.action == "signout")
- {
- if (f.users)
- {
- socialAction.copyAllUserData(f.users)
- }
- if (f.snips)
- {
- socialAction.copyAllSnipData(f.snips)
- }
- if (f.snips)
- {
- for (var g = 0; g < f.snips.length; g++)
- {
- socialAction.copySnipData(f.snips[g])
- }
- for (var b in socialAction.allsnips)
- {
- socialAction.organiseSnipParent(b, true)
- }
- }
- if (f.userid && socialAction.allusers[f.userid])
- {
- socialAction.user = socialAction.allusers[f.userid];
- if (f.useremail)
- {
- socialAction.user.email = f.useremail
- }
- if (f.userdidsuggestions)
- {
- socialAction.user.userdidsuggestions = f.userdidsuggestions
- }
- socialAction.user.accesslevel = socialAction.allusers[f.userid].accesslevel
- }
- if (f.conversations)
- {
- for (var g = 0; g < f.conversations.length; g++)
- {
- socialAction.copyConversationData(f.conversations[g]);
- if (f.conversations[g].text)
- {
- socialAction.processConversationText(f.conversations[g].id, f.conversations[g].text)
- }
- }
- }
- }
- if (f.action == "follow" || f.action == "unfollow")
- {
- d = "user_" + f.action;
- if (f.followingid && socialAction.allusers[f.followingid])
- {
- socialAction.user["follower" + f.followingid] = (f.action == "follow" ? "yes" : "");
- socialAction.user["followerdate" + f.followingid] = (f.action == "follow" ? (new Date()).toString() : "");
- socialAction.allusers[f.followingid]["following" + socialAction.user.id] = (f.action == "follow" ? "yes" : "");
- socialAction.allusers[f.followingid]["followingdate" + socialAction.user.id] = (f.action == "follow" ? (new Date()).toString() : "");
- socialAction.allusers[f.followingid].numfollowers = parseInt(socialAction.allusers[f.followingid].numfollowers) + (f.action == "follow" ? 1 : -1);
- socialAction.user.numfollowing = parseInt(socialAction.user.numfollowing) + (f.action == "follow" ? 1 : -1);
- for (var b in socialAction.allsnips)
- {
- if (socialAction.allsnips[b].userid == f.followingid)
- {
- socialAction.allsnips[b]["timeline" + socialAction.user.id] = (f.action == "follow" ? "yes" : "")
- }
- }
- }
- socialAction.remakeDataLists(0)
- }
- if (f.action == "getfollowing" && f.users)
- {
- d = "reload_following";
- socialAction.remakeDataLists(0)
- }
- if (f.action == "getfollowers" && f.users)
- {
- d = "reload_followers";
- socialAction.remakeDataLists(0)
- }
- if (f.action == "gettimeline" && f.snips)
- {
- d = "reload_timeline";
- socialAction.remakeDataLists(0)
- }
- if (f.action == "getmysnips" && f.snips)
- {
- d = "reload_mysnips";
- socialAction.remakeDataLists(0)
- }
- if (f.action == "getstars" && f.snips)
- {
- d = "reload_stars";
- socialAction.remakeDataLists(0)
- }
- if (f.action == "searchusers" && f.users)
- {
- d = "reload_search_users";
- socialAction.remakeDataLists(-2)
- }
- if (f.action == "searchsnips" && f.snips)
- {
- d = "reload_search_snips";
- socialAction.remakeDataLists(-2)
- }
- if (f.action == "getconversations" && f.conversations)
- {
- d = "reload_conversations";
- socialAction.remakeConversationList(0, 1)
- }
- if (f.action == "getreplies" && f.snips && f.snips[0] && f.snips[0].parentid > 0)
- {
- d = "snip_get_replies";
- socialAction.remakeDataLists(0, false, 0, f.snips[0].parentid)
- }
- if (f.action == "addsnip" && f.id > 0 && !f.error)
- {
- d = "snip_add_snip";
- socialAction.copySnipData(f);
- socialAction.organiseSnipParent(f.id, false);
- if (f.parentid == 0)
- {
- socialAction.user.numsnips = parseInt(socialAction.user.numsnips) + 1
- }
- socialAction.remakeDataLists(0, false, f.id);
- if (f.parentid > 0)
- {
- socialAction.replyingtoid = 0;
- $("#cbsocial form.replyform").hide()
- }
- else
- {
- $("#cbsocial #cbsocialcompose").val("")
- }
- }
- if (f.action == "search")
- {
- d = "search";
- if (f.search)
- {
- d += "/" + f.search
- }
- socialAction.lastSearch = f.search;
- socialAction.remakeDataLists(-1);
- socialAction.showDropDown($("#cbsocialsearch"), 2)
- }
- if (f.action == "getuser")
- {
- d = "user_view";
- if (f.foruserid > 0 && socialAction.allusers[f.foruserid])
- {
- socialAction.displayUserView(f.foruserid)
- }
- }
- if (!f.success && f.error && f.action == "upload")
- {
- socialAction.showMessage("saveprofile", f.error, 0, 1)
- }
- else
- {
- if (!f.success && f.error == "not verified")
- {
- if (f.action == "addsnip" && f.errorparentid > 0)
- {
- socialAction.showMessage("snip" + f.errorparentid, "Please verify your account in order to reply. We've just re-sent the verification email. Do check spam or junk folders.", 0, 1)
- }
- else
- {
- if (f.action == "addsnip")
- {
- socialAction.showMessage("addsnip", "Please verify your account in order to snip. We've just re-sent the verification email. Do check spam or junk folders.", 0, 1)
- }
- else
- {
- if (f.action == "rate" && f.errorsnipid > 0)
- {
- socialAction.showMessage("snip" + f.errorsnipid, "Please verify your account in order to rate snips. We've just re-sent the verification email. Do check spam or junk folders.", 0, 1)
- }
- }
- }
- }
- else
- {
- if (!f.success && f.error)
- {
- socialAction.showMessage(f.action, "oops, " + f.error)
- }
- else
- {
- if (f.action == "upload")
- {
- socialAction.showMessage("saveprofile", "image uploaded, please save your profile", 1, 1)
- }
- else
- {
- if (f.action == "forgot")
- {
- d = "account_forgot";
- socialAction.showMessage(f.action, "we have emailed you your password", 1)
- }
- else
- {
- if (f.action == "saveaccount" && f.emailverification)
- {
- socialAction.showMessage(f.action, "please check your email to verify the change of address", 1, 1);
- $("#cbsocialaccountemail").val(socialAction.user.email)
- }
- else
- {
- if (f.action == "saveprofile" || f.action == "saveaccount")
- {
- socialAction.showMessage(f.action, "data saved", 1)
- }
- else
- {
- if (f.action == "addsnip")
- {
- socialAction.showMessage(f.action, "new snip added to my snips", 1)
- }
- else
- {
- if (f.action == "signup")
- {
- $("#cbsocialsignupform > label").hide();
- $("#cbsocialsignupform > input").hide();
- $("#cbsocialsignupform > select").hide();
- $("#cbsocialsignupform > p").hide();
- socialAction.showMessage(f.action, "We have sent you an email. Please click on the link to verify your account. Check your spam or junk folders if you don't see it soon.<br/><br/>You can immediately sign in to your new account, but will not be able to post snips, replies or stars until you're verified.", 1, 1)
- }
- }
- }
- }
- }
- }
- }
- }
- }
- if (f.action == "checksignin" || j != socialAction.signedin)
- {
- if (f.verify && f.verify == "unsubscribe")
- {
- socialAction.user.emailnotifyfollowers = socialAction.user.emailnotifysnips = socialAction.user.emailnotifyreplies = socialAction.user.emailnotifymarketing = 0
- }
- socialAction.drawMenuBar();
- socialAction.setCookieValue("_cbsid", socialAction.signedin ? 1 : -1, socialAction.rememberSignin)
- }
- if (f.action == "checksignin" && f.forotheruserid)
- {
- d = "profile_view";
- if (f.forotheruserid > 0 && socialAction.allusers[f.forotheruserid])
- {
- socialAction.displayUserView(f.forotheruserid)
- }
- }
- if (f.action == "checksignin" || f.action == "signin")
- {
- if (socialAction.hassnips)
- {
- snipAction.snipInit2(socialAction.isSignedIn() ? socialAction.user.username : "")
- }
- if (socialAction.user.conversationcurrentid > 0)
- {
- socialAction.startOrContinueConversation(socialAction.user.conversationcurrentid, true)
- }
- }
- if (f.action == "checksignin" && f.verify)
- {
- socialAction.showDropDown($("#cbsocialsigninup"), 1);
- var e = socialAction.isSignedIn() ? "saveprofile" : "signin";
- var c = f.verify == "email" ? "email address verified" : (f.verify == "unsubscribe" ? "you are now unsubscribed" : "account verified");
- if (f.verify != "unsubscribe" && !socialAction.isSignedIn())
- {
- c += ", please sign in"
- }
- if (f.verifyerror)
- {
- c = "error with verification, " + f.verifyerror
- }
- else
- {
- if (socialAction.user.accesslevel < 1)
- {
- socialAction.user.accesslevel = 1
- }
- }
- socialAction.showMessage(e, c, f.verifyerror || f.verify == "unsubscribe" ? 0 : 1, 1)
- }
- if (f.action == "addtolog" && f)
- {
- d = "conversation_line";
- socialAction.conversationCurrentId = f.id;
- if (!socialAction.allconversations[f.id])
- {
- socialAction.copyConversationData(f);
- socialAction.remakeConversationList()
- }
- if (f.user && f.bot && socialAction.allconversations[f.id].text)
- {
- socialAction.allconversations[f.id].text += f.user + "\t" + f.bot + "\n";
- socialAction.allconversations[f.id].textshow += socialAction.formatConversationLine(f.user, f.bot);
- socialAction.remakeConversationList(f.id)
- }
- }
- if (f.action == "getconversation" && f.id > 0 && socialAction.allconversations[f.id])
- {
- d = "conversation_load";
- socialAction.processConversationText(f.id, f.text);
- socialAction.remakeConversationList(f.id)
- }
- if (f.action == "saveconversation" && f.id > 0 && socialAction.allconversations[f.id])
- {
- d = "conversation_save";
- if (f.deletethis == "yes" && socialAction.allconversations[f.id])
- {
- d = "conversation_delete";
- delete socialAction.allconversations[f.id];
- socialAction.remakeConversationList();
- if (f.id == socialAction.conversationCurrentId)
- {
- socialAction.startOrContinueConversation(0)
- }
- }
- else
- {
- socialAction.copyConversationData(f)
- }
- }
- if (f.action == "savetweaks")
- {
- d = "account_save_tweak";
- socialAction.user.tweak1 = f.tweak1;
- socialAction.user.tweak2 = f.tweak2;
- socialAction.user.tweak3 = f.tweak3;
- socialAction.setTweaksInPage(f.tweak1, f.tweak2, f.tweak3)
- }
- if (f.action == "saveuser")
- {
- d = "admin_user_save";
- if (f.deletethis == "yes" && socialAction.allusers[f.id])
- {
- d = f.id == socialAction.user.id ? "user_delete" : "admin_user_delete";
- delete socialAction.allusers[f.id]
- }
- else
- {
- socialAction.copyUserData(f)
- }
- $("#cbsocial .admin").removeClass("show");
- socialAction.remakeDataLists(0)
- }
- if (f.action == "savesnip")
- {
- d = "admin_snip_save";
- if (f.deleteratings == "yes")
- {
- d = "snip_unrate"
- }
- if (f.deletethis == "yes" && socialAction.allsnips[f.id])
- {
- d = socialAction.allsnips[f.id].userid == socialAction.user.id ? "snip_delete" : "admin_snip_delete";
- if (socialAction.allsnips[f.id].parentid == 0)
- {
- socialAction.user.numsnips = parseInt(socialAction.user.numsnips) - 1
- }
- delete socialAction.allsnips[f.id]
- }
- else
- {
- socialAction.copySnipData(f)
- }
- $("#cbsocial .admin").removeClass("show");
- socialAction.remakeDataLists(0)
- }
- if (f.action == "saveprofile" || f.action == "saveaccount")
- {
- var h = socialAction.user.logconvs;
- socialAction.copyUserData(f);
- if (h != socialAction.user.logconvs)
- {
- socialAction.remakeConversationList()
- }
- d = f.action == "saveaccount" ? "account_save" : "account_save_profile"
- }
- if (f.action == "getrecent")
- {
- d = "reload_recent";
- if ((f.users || f.snips) && $("#cbsocial form.replyform:visible").length == 0)
- {
- socialAction.remakeDataLists(0)
- }
- socialAction.getRecentDataContinue()
- }
- else
- {
- if (socialAction.isSignedIn())
- {
- socialAction.getRecentData()
- }
- }
- if (!socialAction.makeCache && f.action != "getrecent")
- {
- $("#cbsocial .loading").hide()
- }
- if (d)
- {
- socialAction.trackInGoogle(d)
- }
- if (socialAction.debugMode >= 2)
- {
- f.trackedas = d;
- socialAction.debug("---" + f.action + "-results---", f)
- }
- },
- copyUserData: function(b)
- {
- var c = b.id;
- if (!socialAction.allusers[c])
- {
- socialAction.allusers[c] = {}
- }
- for (var d in b)
- {
- socialAction.allusers[c][d] = b[d]
- }
- },
- copyAllUserData: function(c)
- {
- for (var b = 0; b < c.length; b++)
- {
- socialAction.copyUserData(c[b])
- }
- },
- copyConversationData: function(e)
- {
- var d = e.id;
- if (!socialAction.allconversations[d])
- {
- socialAction.allconversations[d] = {};
- for (var b = 1; b <= socialAction.voteLabels.length; b++)
- {
- socialAction.allconversations[d]["vote" + b] = 0
- }
- }
- for (var c in e)
- {
- socialAction.allconversations[d][c] = e[c]
- }
- if (!socialAction.allconversations[d].text)
- {
- socialAction.allconversations[d].text = ""
- }
- },
- copySnipData: function(e)
- {
- var b = e.id;
- if (!socialAction.allsnips[b])
- {
- socialAction.allsnips[b] = {}
- }
- var c = true;
- var d = e.userid;
- if (!socialAction.allusers[d])
- {
- c = false;
- socialAction.allusers[d] = {
- id: d
- }
- }
- for (var f in e)
- {
- if (d > 0 && f != "id" && (!c || f.substr(0, 9) == "following"))
- {
- socialAction.allusers[d][f] = e[f]
- }
- if (!e.iscached || !socialAction.allsnips[b][f])
- {
- socialAction.allsnips[b][f] = e[f]
- }
- }
- if (!socialAction.allsnips[b].sortdate)
- {
- socialAction.allsnips[b].sortdate = (new Date()).toString()
- }
- socialAction.allsnips[b].sniptime = socialAction.convertDateToSeconds(socialAction.allsnips[b].sortdate);
- if (!socialAction.allsnips[b].snipcreateddate)
- {
- socialAction.allsnips[b].snipcreateddate = (new Date()).toString()
- }
- socialAction.allsnips[b].sniptimeoriginal = socialAction.convertDateToSeconds(socialAction.allsnips[b].snipcreateddate);
- socialAction.allsnips[b].snipdaysold = Math.floor(((new Date()).getTime() - socialAction.allsnips[b].sniptimeoriginal) / 86400000);
- socialAction.calculateSnipRating(b, 0)
- },
- copyAllSnipData: function(d)
- {
- for (var c = 0; c < d.length; c++)
- {
- socialAction.copySnipData(d[c])
- }
- for (var b in socialAction.allsnips)
- {
- socialAction.organiseSnipParent(b, true)
- }
- },
- processConversationText: function(b, f)
- {
- var d = "";
- socialAction.allconversations[b].text = f;
- if (!f)
- {
- d = "conversation log not available"
- }
- else
- {
- var c = f.split("\n");
- socialAction.allconversations[b].numlines = c.length;
- for (var e = 0; e < c.length; e++)
- {
- d += socialAction.formatConversationLine(c[e], false, c.length - e > socialAction.conversationShowInteractions / 2);
- vote = socialAction.getConversationLineVote(c[e]);
- if (vote > 0)
- {
- socialAction.allconversations[b]["vote" + vote] ++
- }
- }
- }
- socialAction.allconversations[b].textshow = d
- },
- organiseSnipParent: function(b, h)
- {
- if (!socialAction.allsnips[b])
- {
- return
- }
- var d = socialAction.allsnips[b].parentid;
- if (!d || !socialAction.allsnips[d])
- {
- return
- }
- if (!socialAction.allsnips[d].children)
- {
- socialAction.allsnips[d].children = new Array()
- }
- var g = socialAction.allsnips[d].children;
- var f = 0;
- for (var e = 0; e < g.length; e++)
- {
- if (g[e] == b)
- {
- f = 1
- }
- }
- if (!f)
- {
- socialAction.allsnips[d].children.unshift(b)
- }
- if (h)
- {
- socialAction.allsnips[d].children.sort(socialAction.sortSnipsByTime)
- }
- },
- calculateSnipRating: function(b, f)
- {
- var d = socialAction.allsnips[b];
- if (!d)
- {
- return
- }
- d.ratingbyme = parseInt(d.ratingbyme);
- if (isNaN(d.ratingbyme))
- {
- d.ratingbyme = 0
- }
- d.ratingscount = parseInt(d.ratingscount);
- if (isNaN(d.ratingscount))
- {
- d.ratingscount = 0
- }
- d.ratingstotal = parseInt(d.ratingstotal);
- if (isNaN(d.ratingstotal))
- {
- d.ratingstotal = 0
- }
- if (f > 0)
- {
- d.ratingbyme = parseInt(f);
- d.ratingscount = d.ratingscount + 1;
- d.ratingstotal = d.ratingstotal + parseInt(f)
- }
- var c = d.ratingscount > 0 ? (d.ratingstotal / d.ratingscount) : 0;
- var e = parseInt((c + 0.25) * 2) / 2;
- socialAction.allsnips[b].ratingstars = e;
- socialAction.allsnips[b].ratingexplanation = "stars:" + e + "*5 + numratings:" + d.ratingscount + " - daysold:" + d.snipdaysold
- },
- trackInGoogle: function(d)
- {
- if (!d || typeof _gat == "undefined" || typeof _gat._getTracker != "function")
- {
- return false
- }
- try
- {
- var b = _gat._getTracker("UA-438584-7");
- b._trackPageview("social_" + d)
- }
- catch (c)
- {}
- },
- makeElement: function(k, c, g, d, h, j)
- {
- var i = document.createElement(k);
- c && $(i).attr("id", c);
- g && $(i).attr("class", g);
- if (h && k != "select")
- {
- $(i).html(h)
- }
- if (j && k == "form" && typeof j == "string")
- {
- if (i.attachEvent)
- {
- i.attachEvent("onsubmit", new Function("e", "socialAction.submitForm('" + j + "',e.srcElement?e.srcElement:e.target);return false;"))
- }
- else
- {
- $(i).attr("onsubmit", "socialAction.submitForm('" + j + "',this); return false;")
- }
- i.fakeSubmit = new Function("socialAction.submitForm('" + j + "',this);")
- }
- else
- {
- if (j && typeof j == "object")
- {
- for (var l in j)
- {
- $(i).attr(l, j[l])
- }
- }
- }
- if (h && typeof h == "object")
- {
- for (var l in h)
- {
- var b = document.createElement("option");
- var m = typeof j == "object" && j.hasOwnProperty("byindex");
- var f = m ? l : (h[l] == "choose one" ? "" : h[l]);
- $(b).val(f);
- $(b).html(h[l]);
- if (typeof j == "object" && j.value && j.value == (m ? l : h[l]))
- {
- $(b).attr("selected", "yes")
- }
- $(i).append(b)
- }
- }
- d && $(d).append(i);
- return i
- },
- drawMenuBar: function(Q)
- {
- var D;
- if ($("#cbsocial").length > 0)
- {
- D = $("#cbsocial");
- if (socialAction.redrawMenu)
- {
- D.empty()
- }
- }
- else
- {
- D = socialAction.makeElement("div", "cbsocial", false);
- $("body").prepend(D)
- }
- var q = (navigator.userAgent.indexOf("MSIE") !== -1 || navigator.appVersion.indexOf("Trident/") > 0);
- if (q)
- {
- $(D).addClass("isie")
- }
- else
- {
- $(D).removeClass("isie")
- }
- var s = $("#cbsocial > ul");
- var m = s.length > 0;
- var x;
- if (m)
- {
- x = s[0];
- s.children("li.recreate").remove()
- }
- else
- {
- socialAction.makeElement("h1", false, false, D, "Cleverbot",
- {
- style: "display:none"
- });
- socialAction.makeElement("div", false, "obscure extend", D);
- x = socialAction.makeElement("ul", false, false, D);
- socialAction.makeElement("div", false, "admin", D);
- socialAction.makeElement("div", false, "loading", D)
- }
- if (socialAction.makeCache)
- {
- var v = socialAction.makeElement("li", false, "justlinks termslink", x);
- a = socialAction.makeElement("span", false, "nopadding", v);
- var v = socialAction.makeElement("li", false, "justlinks", x);
- socialAction.makeElement("span", false, false, v, "apps");
- var v = socialAction.makeElement("li", false, "justlinks morelinks", x);
- socialAction.makeElement("span", false, false, v, "more...")
- }
- else
- {
- if (!m)
- {
- var v = socialAction.makeElement("li", false, "justlinks termslink", x);
- a = socialAction.makeElement("span", false, "nopadding", v);
- var U = socialAction.makeElement("ul", false, "extend", v);
- var S = socialAction.makeElement("li", false, false, U);
- socialAction.makeElement("h2", false, false, S, "About <span>Cleverbot</span>");
- socialAction.makeElement("p", false, false, S, "The site Cleverbot.com started in 2006, but the AI was 'born' in 1988, when Rollo Carpenter saw how to make his machine learn. It has been learning ever since!");
- socialAction.makeElement("p", false, false, S, "Things you say to Cleverbot today may influence what it says to others in future. The program chooses how to respond to you fuzzily, and contextually, the whole of your conversation being compared to the millions that have taken place before.");
- socialAction.makeElement("p", false, false, S, "Many people say there is no bot - that it is connecting people together, live. The AI can seem human because it says things real people do say, but it is always software, imitating people.");
- var S = socialAction.makeElement("li", false, false, U);
- socialAction.makeElement("h2", false, false, S, "Sign in to <span>Cleverbot</span>");
- socialAction.makeElement("p", false, false, S, "You'll have seen <img src=\"" + socialAction.imageBase + 'scissors_yellow.png" alt="scissors icon"/> scissors on Cleverbot. Using them you can share snippets of chats with friends on social networks. Now you can share snips at Cleverbot.com too!');
- socialAction.makeElement("p", false, false, S, "When you sign in to Cleverbot on this blue bar, you can:");
- socialAction.makeElement("p", false, "colourful", S, "Tweak how the AI responds - 3 different ways!<br/>Keep a history of multiple conversations<br/>Switch between conversations<br/>Return to a conversation on any machine<br/>Publish snippets - snips! - for the world to see<br/>Find and follow friends<br/>Be followed yourself!<br/>Rate snips, and see the funniest of them<br/>Reply to snips posted by others<br/>Vote on replies, from awful to great!<br/>Choose not to show the scissors");
- var S = socialAction.makeElement("li", false, false, U);
- socialAction.makeElement("h2", false, false, S, "Feedback");
- socialAction.makeElement("p", false, false, S, 'Comments or suggestions? Please do <a href="http://www.cleverbot.com/contact">let us know.</a>');
- var S = socialAction.makeElement("li", false, false, U);
- socialAction.makeElement("h2", false, false, S, "Policies");
- socialAction.makeElement("p", false, false, S, 'Use of this site constitutes acceptance of our <a href="/privacy">Privacy Policy</a> and <a href="/terms">Terms and Conditions.</a>');
- var v = socialAction.makeElement("li", false, "justlinks", x);
- socialAction.makeElement("span", false, false, v, "apps");
- var U = socialAction.makeElement("ul", false, "extend", v);
- var e = [
- {
- heading: "iOS",
- after: ", for iPhone, iPad and iPod Touch"
- },
- {
- title: "Cleverbot",
- url: "https://itunes.apple.com/app/cleverbot/id383010873?mt=8",
- button: "appstore_blue",
- label: "The full Cleverbot AI, new look, multiple converations, and more!"
- },
- {
- title: "Cleverbot HD",
- url: "https://itunes.apple.com/gb/app/cleverbot-hd/id367903856?mt=8",
- button: "appstore_green",
- label: "Adds image avatars, reacting to everything you say"
- },
- {
- title: "Cleverme!",
- url: "https://itunes.apple.com/us/app/cleverme/id685281893",
- button: "appstore_orange",
- label: "Create a virtual you, and chat to 3 AIs with no internet... FREE!"
- },
- {
- title: "Xaggle",
- url: "https://itunes.apple.com/us/app/xaggle/id581707981",
- button: "appstore_red",
- label: "A creative speedy word game to play with friends, or solo"
- },
- {
- title: "Bot or Not",
- url: "https://itunes.apple.com/us/app/bot-or-not/id866757983?ls=1&mt=8",
- button: "appstore_purple",
- label: "Play the imitation game, to win! Who's what and which is not?"
- },
- {
- title: "Pupito",
- url: "s.apple.com/us/app/pupito!/id522091447?mt=8",
- button: "appstore_blue",
- label: "Chat to the Clever Pup, and make him leap!"
- },
- {
- title: "Clevernator",
- url: "https://itunes.apple.com/us/app/clevernator/id715519972?l=en&mt=8",
- button: "appstore_green",
- label: "AI from the future has come... to play a game of 20 questions!"
- },
- {
- heading: "Android",
- after: ", via Google Play or Amazon"
- },
- {
- title: "Cleverbot",
- url: "https://play.google.com/store/apps/details?id=com.icogno.cleverbot&hl=en_GB",
- button: "google",
- label: "The Cleverbot AI, chat bubbles and built-in voice chat",
- url2: "http://www.amazon.co.uk/Icogno-Ltd-Cleverbot/dp/B00CHNC2BS",
- button2: "amazon"
- },
- {
- title: "Clevermessage",
- url: "https://play.google.com/store/apps/details?id=com.existor.clevermessageapp&hl=en",
- button: "google",
- label: "Surprise your friends, Cleverbot replying automatically to texts!"
- },
- {
- title: "Clevertweet",
- url: "https://play.google.com/store/apps/details?id=com.existor.Clevertweeter",
- button: "google",
- label: "Automate your tweeting! Tell Cleverbot when to reply"
- },
- {
- heading: "Windows Phone"
- },
- {
- title: "Cleverbot",
- url: "http://www.windowsphone.com/en-gb/store/app/cleverbot/496a2a46-6823-4673-8c00-d8c2af77670f",
- button: "windows",
- label: "Talk to an app with Actual Intelligence!",
- img: "cleverbot_win"
- },
- {
- title: "Clever English",
- url: "http://www.windowsphone.com/en-gb/store/app/clever-english/9f75250a-207d-4007-8747-842077a433ee",
- button: "windows",
- label: "The best way to learn English is by using English naturally."
- }];
- for (var T = 0; T < e.length; T++)
- {
- var W = e[T];
- var S = socialAction.makeElement("li", false, false, U);
- if (W.heading)
- {
- var V = socialAction.makeElement("h2", false, false, S, W.heading);
- if (W.after)
- {
- socialAction.makeElement("span", false, false, V, W.after)
- }
- }
- if (W.button)
- {
- var X = socialAction.makeElement("div", false, false, S);
- var f = socialAction.makeElement("a", false, false, X, false,
- {
- href: W.url,
- target: "_blank"
- });
- socialAction.makeElement("img", false, false, f, false,
- {
- src: socialAction.imageBase + "app_" + W.button + ".jpg",
- alt: ""
- });
- if (W.button2)
- {
- socialAction.makeElement("br", false, false, X);
- var f = socialAction.makeElement("a", false, false, X, false,
- {
- href: W.url2,
- target: "_blank"
- });
- socialAction.makeElement("img", false, false, f, false,
- {
- src: socialAction.imageBase + "app_" + W.button2 + ".jpg",
- alt: ""
- })
- }
- }
- if (W.label)
- {
- var d = socialAction.imageBase + "app_";
- d += W.img ? W.img : W.title.replace(" ", "_").replace(" ", "_").replace("!", "").toLowerCase();
- d += ".jpg";
- var f = socialAction.makeElement("a", false, false, S, false,
- {
- href: W.url,
- target: "_blank"
- });
- socialAction.makeElement("img", false, false, f, false,
- {
- src: d,
- alt: ""
- })
- }
- if (W.title)
- {
- var u = socialAction.makeElement("p", false, false, S);
- var f = socialAction.makeElement("a", false, false, u, false,
- {
- href: W.url,
- target: "_blank"
- });
- socialAction.makeElement("strong", false, false, f, W.title)
- }
- if (W.label)
- {
- var u = socialAction.makeElement("p", false, false, S);
- socialAction.makeElement("a", false, false, u, W.label,
- {
- href: W.url,
- target: "_blank"
- })
- }
- socialAction.makeElement("div", false, "clear", S)
- }
- var v = socialAction.makeElement("li", false, "justlinks morelinks", x);
- socialAction.makeElement("span", false, false, v, "more...");
- var U = socialAction.makeElement("ul", false, "extend", v);
- var S = socialAction.makeElement("li", false, false, U);
- socialAction.makeElement("a", false, "green", S, "Contact",
- {
- href: "/contact"
- });
- socialAction.makeElement("br", false, false, S);
- socialAction.makeElement("a", false, "green", S, "Cleverbot apps",
- {
- href: "/app"
- });
- socialAction.makeElement("br", false, false, S);
- socialAction.makeElement("a", false, "green", S, "Cleverbot snips",
- {
- href: "/me/cleverbot"
- });
- socialAction.makeElement("br", false, false, S);
- socialAction.makeElement("a", false, "green", S, "Cleverness files",
- {
- href: "/cleverness"
- });
- socialAction.makeElement("br", false, false, S);
- socialAction.makeElement("a", false, "green", S, "Linking to Cleverbot",
- {
- href: "/linkingin"
- });
- socialAction.makeElement("br", false, false, S);
- socialAction.makeElement("a", false, "green", S, "Turing Test, June 2014: press release",
- {
- href: "/amused"
- });
- var S = socialAction.makeElement("li", false, false, U);
- socialAction.makeElement("a", false, "imageonleft red", S, '<img src="http://www.cleverbot.com/s/c/youtube.jpg" alt=""/> Clever them!',
- {
- href: "/cleverthem"
- });
- socialAction.makeElement("br", false, false, S);
- socialAction.makeElement("a", false, "imageonleft pink", S, '<img src="http://www.cleverbot.com/s/c/lips_40_24.jpg" alt=""/> Cleverlips!',
- {
- href: "/cleverlips"
- });
- socialAction.makeElement("br", false, false, S);
- socialAction.makeElement("a", false, "imageonleft purple", S, '<img src="http://www.cleverbot.com/s/c/evie_on_white_45_42.jpg" alt=""/> Evie, our avatar<br/>at existor.com!',
- {
- href: "http:///www.existor.com/"
- });
- var S = socialAction.makeElement("li", false, false, U);
- socialAction.makeElement("a", false, "blue", S, "42% human - Machine Intelligence Prize",
- {
- href: "/machine"
- });
- socialAction.makeElement("br", false, false, S);
- socialAction.makeElement("a", false, "blue", S, "59% human - a Turing Test",
- {
- href: "/human"
- });
- socialAction.makeElement("br", false, false, S);
- socialAction.makeElement("a", false, "blue", S, "Cleverbot parallel processing",
- {
- href: "http://www.existor.com/ai-parallel"
- });
- socialAction.makeElement("br", false, false, S);
- socialAction.makeElement("a", false, "blue", S, 'Developers, create bots! <img src="http://www.cleverbot.com/s/c/cleverscript_118_17.jpg" alt="Cleverscript"/>',
- {
- href: "http://www.cleverscript.com/"
- });
- socialAction.makeElement("br", false, false, S);
- socialAction.makeElement("a", false, "blue", S, 'In partnership with <img src="http://www.cleverbot.com/s/c/selectel_59_17.jpg" alt="Selectel"/>',
- {
- href: "http://www.selectel.com/"
- });
- socialAction.makeElement("br", false, false, S);
- socialAction.makeElement("a", false, "blue", S, "Follow @cleverbot",
- {
- href: "https://twitter.com/cleverbot"
- })
- }
- }
- if (socialAction.maintenanceMode >= 3)
- {
- var v = socialAction.makeElement("li", false, "recreate", x);
- socialAction.makeElement("span", false, "maintenance", v, socialAction.maintenanceMessage)
- }
- if (socialAction.maintenanceMode == 2)
- {
- var v = socialAction.makeElement("li", "cbsocialsignup", "recreate", x);
- socialAction.makeElement("span", false, "maintenance", v, "loading...")
- }
- else
- {
- if (socialAction.signedin && socialAction.maintenanceMode < 2)
- {
- var v = socialAction.makeElement("li", "cbsocialsigninup", "tabs withpicture recreate", x);
- if (!socialAction.runSimple)
- {
- $(v).css("background-image", "url(" + socialAction.user.photolocation + ")")
- }
- var ab = socialAction.user.username;
- if (ab && ab.length > 15)
- {
- ab = ab.substring(0, 14) + "..."
- }
- var P = socialAction.makeElement("span", false, false, v, ab);
- var U = socialAction.makeElement("ul", false, "extend", v);
- var S = socialAction.makeElement("li", false, "show", U);
- socialAction.makeElement("h3", false, false, S, "profile");
- var b = socialAction.makeElement("form", false, false, S, false, "saveprofile");
- socialAction.makeElement("p", "cbsocialmessagesaveprofile", "message", b);
- var l = {
- name: "fullname",
- type: "text",
- value: socialAction.user.fullname
- };
- socialAction.makeElement("label", false, false, b, "Full name",
- {
- "for": "cbsocialprofilefullname"
- });
- socialAction.makeElement("input", "cbsocialprofilefullname", false, b, false, l);
- socialAction.makeElement("label", false, false, b, "Photo",
- {
- "for": "cbsocialprofilephoto"
- });
- l = {
- src: socialAction.user.photolocation ? socialAction.user.photolocation : socialAction.imageBase + "no_photo.jpg"
- };
- socialAction.makeElement("img", "cbsocialshowphoto", false, b, false, l);
- l = {
- type: "button",
- value: "upload photo"
- };
- socialAction.makeElement("input", "cbsocialprofilephoto", "fileupload", b, false, l);
- l = {
- name: "uploadphoto",
- type: "hidden",
- value: "0"
- };
- socialAction.makeElement("input", "cbsocialprofilephotoupload", false, b, false, l);
- socialAction.makeElement("div", "clear", false, b);
- socialAction.makeElement("label", false, false, b, "Header",
- {
- "for": "cbsocialprofileheader"
- });
- l = {
- src: socialAction.user.headerlocation ? socialAction.user.headerlocation : socialAction.imageBase + "no_header.jpg"
- };
- socialAction.makeElement("img", "cbsocialshowheader", "header", b, false, l);
- l = {
- type: "button",
- value: "upload header"
- };
- socialAction.makeElement("input", "cbsocialprofileheader", "fileupload", b, false, l);
- l = {
- name: "uploadheader",
- type: "hidden",
- value: "0"
- };
- socialAction.makeElement("input", "cbsocialprofileheaderupload", false, b, false, l);
- socialAction.makeElement("div", "clear", false, b);
- l = {
- name: "location",
- type: "text",
- value: socialAction.user.location
- };
- socialAction.makeElement("label", false, false, b, "Location",
- {
- "for": "cbsocialprofilelocation"
- });
- socialAction.makeElement("input", "cbsocialprofilelocation", false, b, false, l);
- l = {
- name: "biography",
- value: socialAction.user.biography,
- rows: 3
- };
- socialAction.makeElement("span", "cbsocialprofilebiocharcount", "charcount", b);
- socialAction.makeElement("label", false, false, b, "Bio",
- {
- "for": "cbsocialprofilebio"
- });
- socialAction.makeElement("textarea", "cbsocialprofilebio", false, b, l.value, l);
- l = {
- type: "submit",
- value: "save profile"
- };
- socialAction.makeElement("input", false, "spaceabove savebutton", b, false, l);
- l = {
- type: "button",
- value: "view my profile"
- };
- var M = socialAction.makeElement("input", false, "spaceabove", b, false, l);
- $(M).click(function()
- {
- socialAction.displayUserView(socialAction.user.id)
- });
- socialAction.makeElement("div", false, "clear", b);
- var S = socialAction.makeElement("li", false, false, U);
- socialAction.makeElement("h3", false, false, S, "account");
- var b = socialAction.makeElement("form", false, false, S, false, "saveaccount");
- socialAction.makeElement("p", "cbsocialmessagesaveaccount", "message", b);
- l = {
- name: "usernamenoedit",
- type: "text",
- readonly: "readonly",
- value: socialAction.user.username
- };
- socialAction.makeElement("label", false, false, b, "Username",
- {
- "for": "cbsocialaccountusername"
- });
- socialAction.makeElement("input", "cbsocialaccountusername", "noedit", b, false, l);
- l = {
- name: "email",
- type: "text",
- value: socialAction.user.email,
- maxlength: 100
- };
- socialAction.makeElement("label", false, false, b, "Email",
- {
- "for": "cbsocialaccountemail"
- });
- socialAction.makeElement("input", "cbsocialaccountemail", false, b, false, l);
- l = {
- name: "oldpassword",
- type: "password",
- maxlength: 25
- };
- socialAction.makeElement("label", false, false, b, "Old password",
- {
- "for": "cbsocialaccountoldpassword"
- });
- socialAction.makeElement("input", "cbsocialaccountoldpassword", false, b, false, l);
- l = {
- name: "newpassword",
- type: "password",
- maxlength: 25
- };
- socialAction.makeElement("label", false, false, b, "New password",
- {
- "for": "cbsocialaccountnewpassword"
- });
- socialAction.makeElement("input", "cbsocialaccountnewpassword", false, b, false, l);
- l = {
- name: "showsv",
- value: socialAction.user.showsv > 0 ? (socialAction.user.showsv == 1 ? "scissors" : "scissors and voting") : "no"
- };
- socialAction.makeElement("label", false, false, b, "Show scissors and voting (applies next time you visit)",
- {
- "for": "cbsocialaccountshowsv"
- });
- socialAction.makeElement("select", "cbsocialaccountshowsv", false, b, ["no", "scissors", "scissors and voting"], l);
- l = {
- name: "autosnip",
- value: socialAction.user.autosnip > 0 ? "yes" : "no"
- };
- socialAction.makeElement("label", false, false, b, "Automatically add facebook/twitter/etc snips here",
- {
- "for": "cbsocialaccountautosnip"
- });
- socialAction.makeElement("select", "cbsocialaccountautosnip", false, b, ["no", "yes"], l);
- l = {
- name: "logconvs",
- value: socialAction.user.logconvs > 0 ? "yes" : "no"
- };
- socialAction.makeElement("label", false, false, b, "Conversation logging",
- {
- "for": "cbsocialaccountlogconvs"
- });
- socialAction.makeElement("select", "cbsocialaccountlogconvs", false, b, ["no", "yes"], l);
- var L = {
- followers: "Email me when I have a new follower",
- snips: "Email me when someone I'm following makes a snip",
- replies: "Email me when someone replies to one of my snips",
- marketing: "Keep me informed of relevant updates and new products"
- };
- for (var k in L)
- {
- l = {
- name: "emailnotify" + k,
- type: "text",
- value: socialAction.user["emailnotify" + k] > 0 ? "yes" : "no"
- };
- socialAction.makeElement("label", false, false, b, L[k],
- {
- "for": "cbsocialaccountemailnotify" + k
- });
- socialAction.makeElement("select", "cbsocialaccountemailnotify" + k, false, b, ["no", "yes"], l)
- }
- var O = socialAction.makeElement("p", false, "sslleft", b, "Cleverbot registration and sign in is protected by SSL");
- socialAction.makeElement("div", false, "clear", b);
- socialAction.addDeleteButtonToForm(b, "delete account", "delete your account, including all your snips and conversations");
- l = {
- type: "submit",
- value: "save account"
- };
- socialAction.makeElement("input", false, "savebutton", b, false, l);
- socialAction.makeElement("div", false, "clear", b);
- var J = socialAction.uploadDimensions;
- upclick(
- {
- maxsize: 5000000,
- element: document.getElementById("cbsocialprofilephoto"),
- action: socialAction.uploadurl + "?action=upload&field=photo&width=" + J.photo.width + "&height=" + J.photo.height,
- onstart: function(h)
- {
- socialAction.showMessage("saveprofile", "uploading photo...", 1, 1);
- socialAction.showDropDown($("#cbsocialsigninup"), 1);
- document.getElementById("cbsocialprofilephotoupload").value = 1;
- $("#cbsocial .loading").show()
- },
- oncomplete: function(h)
- {
- document.getElementById("cbsocialprofilephotoupload").value = 2;
- $("#cbsocial .loading").hide();
- if (h && h.error)
- {
- socialAction.processAction(
- {
- action: "upload",
- success: 0,
- error: h.error
- })
- }
- }
- });
- upclick(
- {
- maxsize: 5000000,
- element: document.getElementById("cbsocialprofileheader"),
- action: socialAction.uploadurl + "?action=upload&field=header&width=" + J.header.width + "&height=" + J.header.height,
- onstart: function(h)
- {
- socialAction.showMessage("saveprofile", "uploading header...", 1, 1);
- socialAction.showDropDown($("#cbsocialsigninup"), 1);
- document.getElementById("cbsocialprofileheaderupload").value = 1;
- $("#cbsocial .loading").show()
- },
- oncomplete: function(h)
- {
- document.getElementById("cbsocialprofileheaderupload").value = 2;
- $("#cbsocial .loading").hide();
- if (h && h.error)
- {
- socialAction.processAction(
- {
- action: "upload",
- success: 0,
- error: h.error
- })
- }
- }
- });
- var S = socialAction.makeElement("li", false, false, U);
- socialAction.makeElement("h3", false, false, S, "sign out");
- var b = socialAction.makeElement("form", false, false, S, false, "signout");
- socialAction.makeElement("p", false, false, b, "Use this button to sign out of Cleverbot");
- l = {
- type: "submit",
- value: "sign out"
- };
- socialAction.makeElement("input", false, false, b, false, l)
- }
- else
- {
- if (socialAction.makeCache)
- {
- var v = socialAction.makeElement("li", "cbsocialsigninup", "verticalforms recreate", x);
- socialAction.makeElement("span", false, false, v, "sign in")
- }
- else
- {
- if (socialAction.maintenanceMode < 2)
- {
- var v = socialAction.makeElement("li", "cbsocialsigninup", "verticalforms recreate", x);
- socialAction.makeElement("span", false, false, v, "sign in");
- var U = socialAction.makeElement("ul", false, "extend", v);
- var S = socialAction.makeElement("li", false, false, U);
- var b = socialAction.makeElement("form", false, false, S, false, "signin");
- socialAction.makeElement("p", "cbsocialmessagesignin", "message", b);
- var l = {
- name: "username",
- type: "text",
- value: "username or email address",
- placeholder: "username or email address",
- maxlength: 25
- };
- socialAction.makeElement("input", false, "prefill", b, false, l);
- socialAction.makeElement("br", false, false, b);
- var l = {
- type: "text",
- value: "password",
- maxlength: 25
- };
- socialAction.makeElement("input", false, "passwordclear", b, false, l);
- var l = {
- name: "password",
- type: "password",
- maxlength: 25
- };
- socialAction.makeElement("input", false, "passwordnormal", b, false, l);
- socialAction.makeElement("br", false, false, b);
- socialAction.makeElement("input", false, false, b, false,
- {
- name: "remember",
- type: "hidden",
- value: socialAction.rememberSignin
- });
- var j = {
- type: "submit",
- value: "sign in"
- };
- socialAction.makeElement("input", false, false, b, false, j);
- var E = socialAction.makeElement("span", false, "collapselink", b, "forgotten?");
- if (!socialAction.makeCache)
- {
- $(E).click(function()
- {
- $("#cbsocialforgot").toggle(500, socialAction.resizeExtenders)
- })
- }
- var S = socialAction.makeElement("li", "cbsocialforgot", "collapsecontent", U);
- socialAction.makeElement("h3", false, false, S, "forgotten your password?");
- var b = socialAction.makeElement("form", false, false, S, false, "forgot");
- socialAction.makeElement("p", "cbsocialmessageforgot", "message", b);
- var l = {
- name: "email",
- type: "text",
- value: "email address",
- placeholder: "email address"
- };
- socialAction.makeElement("input", false, "prefill", b, false, l);
- socialAction.makeElement("br", false, false, b);
- var l = {
- type: "submit",
- value: "remind me"
- };
- socialAction.makeElement("input", false, false, b, false, l);
- socialAction.makeElement("br", false, false, b);
- socialAction.makeElement("div", false, "clear", b);
- var S = socialAction.makeElement("li", false, false, U);
- socialAction.makeElement("h3", false, false, S, "or register!");
- var b = socialAction.makeElement("form", "cbsocialsignupform", false, S, false, "signup");
- if (socialAction.maintenanceMode == 1)
- {
- socialAction.makeElement("p", false, false, b, socialAction.signupMessage)
- }
- socialAction.makeElement("p", "cbsocialmessagesignup", "message", b);
- var l = {
- name: "username",
- type: "text",
- value: "username",
- placeholder: "username",
- maxlength: 25
- };
- socialAction.makeElement("input", false, "prefill", b, false, l);
- socialAction.makeElement("br", false, false, b);
- var l = {
- name: "fullname",
- type: "text",
- value: "full name",
- placeholder: "full name",
- maxlength: 100
- };
- socialAction.makeElement("input", false, "prefill", b, false, l);
- socialAction.makeElement("br", false, false, b);
- var l = {
- name: "email",
- type: "text",
- value: "email address",
- placeholder: "email address",
- maxlength: 100
- };
- socialAction.makeElement("input", false, "prefill", b, false, l);
- socialAction.makeElement("br", false, false, b);
- var l = {
- type: "text",
- value: "password",
- maxlength: 25
- };
- socialAction.makeElement("input", false, "passwordclear", b, false, l);
- var l = {
- name: "password",
- type: "password",
- maxlength: 25
- };
- socialAction.makeElement("input", false, "passwordnormal", b, false, l);
- socialAction.makeElement("br", false, false, b);
- var l = {
- name: "terms",
- value: "password"
- };
- var N = socialAction.makeElement("label", false, "labelasp", b, 'Do you agree to our <a href="/terms">terms &</a> <a href="/privacy">privacy policy?</a>',
- {
- "for": "cbsocialregisterterms"
- });
- var A = socialAction.makeElement("select", "cbsocialregisterterms", false, b, ["no", "yes"], l);
- var l = {
- type: "submit",
- value: "sign up to Cleverbot"
- };
- socialAction.makeElement("input", false, "standout", b, false, l);
- socialAction.makeElement("br", false, false, b);
- var w = "keep your conversations!<br/>switch between them!<br/>post a million snips!<br/>rate other snips!<br/>gain followers!<br/>become a star<br/><br/>";
- var o = "and we'll start to build<br/>a virtual you - a Cleverme!";
- var O = socialAction.makeElement("p", false, "signuptext", b, w);
- socialAction.makeElement("span", false, false, O, o);
- var O = socialAction.makeElement("p", false, "sslright", b, "Cleverbot registration and sign in are protected by SSL")
- }
- }
- }
- }
- if (socialAction.signedin && socialAction.maintenanceMode < 2 && !socialAction.makeCache)
- {
- var v = socialAction.makeElement("li", "cbsocialtweaksmenu", "tabs tweaks recreate", x);
- socialAction.makeElement("span", false, false, v, "tweaks");
- var U = socialAction.makeElement("ul", false, "extend", v);
- var S = socialAction.makeElement("li", "", "show", U);
- var n = socialAction.makeElement("form", false, false, S, false, "savetweaks");
- socialAction.makeElement("h3", false, false, n, "Cleverbot should be...");
- var O = socialAction.makeElement("p", false, false, n, "Sensible");
- socialAction.makeElement("span", false, false, O, "Wacky");
- socialAction.makeElement("input", false, false, n, "",
- {
- name: "tweak1",
- type: "hidden",
- value: socialAction.user.tweak1
- });
- var aa = socialAction.makeElement("div", "", "slider slider1", n);
- var O = socialAction.makeElement("p", false, false, n, "Shy");
- socialAction.makeElement("span", false, false, O, "Talkative");
- socialAction.makeElement("input", false, false, n, "",
- {
- name: "tweak2",
- type: "hidden",
- value: socialAction.user.tweak2
- });
- var Z = socialAction.makeElement("div", "", "slider slider2", n);
- var O = socialAction.makeElement("p", false, false, n, "Self centred");
- socialAction.makeElement("span", false, false, O, "Attentive");
- socialAction.makeElement("input", false, false, n, "",
- {
- name: "tweak3",
- type: "hidden",
- value: socialAction.user.tweak3
- });
- var Y = socialAction.makeElement("div", "", "slider slider3", n);
- $(aa).slider(
- {
- min: 0,
- max: 100,
- step: 10,
- value: socialAction.user.tweak1,
- change: function(h, i)
- {
- $(this).prev().val(i.value);
- $(this).parent()[0].fakeSubmit()
- },
- slide: function(h, i)
- {
- socialAction.showDropDown($("#cbsocial li.tweaks"), 1)
- }
- });
- $(Z).slider(
- {
- min: 0,
- max: 100,
- step: 10,
- value: socialAction.user.tweak2,
- change: function(h, i)
- {
- $(this).prev().val(i.value);
- $(this).parent()[0].fakeSubmit()
- },
- slide: function(h, i)
- {
- socialAction.showDropDown($("#cbsocial li.tweaks"), 1)
- }
- });
- $(Y).slider(
- {
- min: 0,
- max: 100,
- step: 10,
- value: socialAction.user.tweak3,
- change: function(h, i)
- {
- $(this).prev().val(i.value);
- $(this).parent()[0].fakeSubmit()
- },
- slide: function(h, i)
- {
- socialAction.showDropDown($("#cbsocial li.tweaks"), 1)
- }
- });
- var K = socialAction.makeElement("p", false, false, n);
- var z = socialAction.makeElement("a", false, false, K, "Let us know why you like your tweaks",
- {
- href: "/contact",
- target: "_blank"
- });
- $(z).click(function()
- {
- var h = encodeURIComponent("I like these tweaks because...");
- var i = encodeURIComponent("userid=" + socialAction.user.id + ", tweak1=" + socialAction.user.tweak1 + ", tweak2=" + socialAction.user.tweak2 + ", tweak3=" + socialAction.user.tweak3);
- var p = socialAction.user.email;
- this.href = "/contact?pre=" + h + "&extra=" + i + "&email=" + p
- })
- }
- else
- {
- if (socialAction.maintenanceMode < 2)
- {
- var v = socialAction.makeElement("li", "cbsocialtweaksmenu", "notsignedin recreate", x);
- socialAction.makeElement("span", false, false, v, "tweaks")
- }
- }
- if (socialAction.signedin && socialAction.maintenanceMode < 2 && !socialAction.makeCache)
- {
- var v = socialAction.makeElement("li", "cbsocialconversationsmenu", "tabs recreate", x);
- socialAction.makeElement("span", false, false, v, "conversations");
- var U = socialAction.makeElement("ul", false, "extend", v);
- var S = socialAction.makeElement("li", "cbsocialconversations", "show", U);
- var B = socialAction.makeElement("ul", false, false, S)
- }
- else
- {
- if (socialAction.maintenanceMode < 2)
- {
- var v = socialAction.makeElement("li", "cbsocialconversationsmenu", "notsignedin recreate", x);
- socialAction.makeElement("span", false, false, v, "conversations")
- }
- }
- if (socialAction.maintenanceMode < 2 && !socialAction.makeCache)
- {
- var v = socialAction.makeElement("li", "cbsocialsnipsmenu", "tabs recreate", x);
- socialAction.makeElement("span", false, false, v, "snips");
- var U = socialAction.makeElement("ul", false, "extend", v);
- var S = socialAction.makeElement("li", "cbsocialsnipsstars", socialAction.signedin ? false : "show", U);
- socialAction.makeElement("h3", false, false, S, "stars!");
- var B = socialAction.makeElement("ul", false, false, S);
- var S = socialAction.makeElement("li", "cbsocialsnipsmysnips", false, U);
- socialAction.makeElement("h3", false, false, S, "my snips");
- var B = socialAction.makeElement("ul", false, false, S);
- socialAction.signInMessageForTab(B, "to view your snips");
- var S = socialAction.makeElement("li", "cbsocialsnipstimeline", socialAction.signedin ? "show" : false, U);
- socialAction.makeElement("h3", false, false, S, "timeline");
- var B = socialAction.makeElement("ul", false, false, S);
- socialAction.signInMessageForTab(B, "to view your timeline");
- var S = socialAction.makeElement("li", "cbsocialsnipsnew", false, U);
- socialAction.makeElement("h3", false, "onright", S, "new");
- if (socialAction.signedin)
- {
- var t = socialAction.makeElement("form", false, false, S, false, "addsnip");
- socialAction.makeElement("p", "cbsocialmessageaddsnip", "message", t);
- socialAction.makeElement("span", "cbsocialcomposecharcount", "charcount", t);
- var g = socialAction.makeElement("label", false, false, t, "add a new snip",
- {
- "for": "cbsocialcompose"
- });
- socialAction.makeElement("span", false, false, g, " (or try the scissors snip! window)");
- socialAction.makeElement("textarea", "cbsocialcompose", "prefill", t, "",
- {
- name: "text",
- rows: 3
- });
- socialAction.makeElement("input", false, "spaceabove", t, false,
- {
- type: "submit",
- value: "snip it!"
- })
- }
- else
- {
- var B = socialAction.makeElement("ul", false, false, S);
- socialAction.signInMessageForTab(B, "to post a snip")
- }
- }
- else
- {
- if (socialAction.maintenanceMode < 2)
- {
- var v = socialAction.makeElement("li", "cbsocialsnipsmenu", "notsignedin recreate", x);
- socialAction.makeElement("span", false, false, v, "snips")
- }
- }
- if (socialAction.signedin && socialAction.maintenanceMode < 2 && !socialAction.makeCache)
- {
- var v = socialAction.makeElement("li", "cbsocialusersmenu", "tabs recreate", x);
- socialAction.makeElement("span", false, false, v, "people");
- var U = socialAction.makeElement("ul", false, "extend", v);
- var S = socialAction.makeElement("li", "cbsocialusersfollowers", false, U);
- var H = socialAction.makeElement("h3", false, false, S, "followers");
- var B = socialAction.makeElement("ul", false, false, S);
- var S = socialAction.makeElement("li", "cbsocialusersfollowing", "show", U);
- var H = socialAction.makeElement("h3", false, false, S, "following");
- var B = socialAction.makeElement("ul", false, false, S);
- var S = socialAction.makeElement("li", "cbsocialuserssuggested", false, U);
- var H = socialAction.makeElement("h3", false, false, S, "suggestions");
- var B = socialAction.makeElement("ul", false, false, S)
- }
- else
- {
- if (socialAction.maintenanceMode < 2)
- {
- var v = socialAction.makeElement("li", "cbsocialusersmenu", "notsignedin recreate", x);
- socialAction.makeElement("span", false, false, v, "people")
- }
- }
- if (socialAction.signedin && socialAction.maintenanceMode < 2 && !socialAction.makeCache)
- {
- var v = socialAction.makeElement("li", "cbsocialsearch", "tabs noshowonhover recreate", x);
- var c = socialAction.makeElement("form", false, "forminmenu", v, "", "search");
- socialAction.makeElement("input", false, "prefill", c, "",
- {
- name: "search",
- type: "text",
- value: "search"
- });
- var U = socialAction.makeElement("ul", false, "extend", v);
- var S = socialAction.makeElement("li", "cbsocialuserssearch", false, U);
- var H = socialAction.makeElement("h3", false, false, S, "people");
- socialAction.makeElement("span", false, "unbold", H);
- var B = socialAction.makeElement("ul", false, false, S);
- var S = socialAction.makeElement("li", "cbsocialsnipssearch", false, U);
- var H = socialAction.makeElement("h3", false, false, S, "snips");
- socialAction.makeElement("span", false, "unbold", H);
- var B = socialAction.makeElement("ul", false, false, S);
- $("#cbsocial form.forminmenu input").hover(function()
- {
- $(this).addClass("show", 500)
- }, function()
- {
- if (!$(this).prop("already"))
- {
- $(this).removeClass("show", 500)
- }
- });
- $("#cbsocial form.forminmenu input").blur(function()
- {
- var h = $(this);
- if (!h.val() && h.prop("already"))
- {
- h.val(h.prop("already"));
- h.prop("already", "");
- h.addClass("prefill");
- h.removeClass("show", 500)
- }
- })
- }
- else
- {
- if (socialAction.maintenanceMode < 2)
- {
- var v = socialAction.makeElement("li", "cbsocialsearchinactive", "notsignedin recreate", x);
- socialAction.makeElement("span", false, false, v, "search")
- }
- }
- if (socialAction.maintenanceMode < 2 && $("#cbsocial div.viewuser").length == 0)
- {
- socialAction.makeElement("div", false, "obscureuser extend", D);
- var G = socialAction.makeElement("div", false, "viewuser extend", D);
- var I = socialAction.makeElement("a", false, "closeuser", G);
- socialAction.makeElement("img", false, false, I, false,
- {
- src: socialAction.imageBase + "user_close.png"
- });
- socialAction.makeElement("div", false, "header", G);
- var U = socialAction.makeElement("ul", false, false, G);
- var S = socialAction.makeElement("li", "cbsocialsnipsonesnip_user", "onesnip", U);
- var C = socialAction.makeElement("span", false, false, S, false);
- socialAction.makeElement("span", false, false, C, "this snip");
- socialAction.makeElement("ul", false, false, S);
- var S = socialAction.makeElement("li", "cbsocialsnipsmysnips_user", "showdefault", U);
- var C = socialAction.makeElement("span", false, false, S, false);
- socialAction.makeElement("span", false, "bold", C);
- socialAction.makeElement("span", false, false, C, "snips");
- socialAction.makeElement("ul", false, false, S);
- var S = socialAction.makeElement("li", "cbsocialsnipsmybest_user", false, U);
- var C = socialAction.makeElement("span", false, false, S, false);
- socialAction.makeElement("span", false, "bold", C);
- socialAction.makeElement("span", false, false, C, "best");
- socialAction.makeElement("ul", false, false, S);
- var S = socialAction.makeElement("li", "cbsocialusersfollowing_user", false, U);
- var C = socialAction.makeElement("span", false, false, S, false);
- socialAction.makeElement("span", false, "bold", C);
- socialAction.makeElement("span", false, false, C, "following");
- socialAction.makeElement("ul", false, false, S);
- var S = socialAction.makeElement("li", "cbsocialusersfollowers_user", false, U);
- var C = socialAction.makeElement("span", false, false, S, false);
- socialAction.makeElement("span", false, "bold", C);
- socialAction.makeElement("span", false, false, C, "followers");
- socialAction.makeElement("ul", false, false, S);
- var S = socialAction.makeElement("li", false, "backbutton", U);
- var C = socialAction.makeElement("span", false, false, S, "<back")
- }
- if (socialAction.maintenanceMode < 2 && !socialAction.makeCache)
- {
- socialAction.remakeDataLists(0);
- socialAction.remakeConversationList(0)
- }
- if (!socialAction.makeCache)
- {
- socialAction.hookUpInteractions()
- }
- if (!socialAction.makeCache && Q)
- {
- $("#cbsocial .loading").hide()
- }
- },
- hookUpInteractions: function(b)
- {
- if (!b)
- {
- $("#cbsocial > ul > li").not("li.notsignedin").hover(function()
- {
- if (!socialAction.stuckMenu)
- {
- socialAction.showDropDown($(this), 0)
- }
- }, function()
- {
- if (!socialAction.stuckMenu)
- {
- socialAction.hideDropDown($(this), 0)
- }
- });
- $("#cbsocial > ul > li .fileupload").mouseleave(function(c)
- {
- c.stopPropagation()
- });
- $("#cbsocial > .obscure").click(socialAction.hideStuckDropDown);
- $("#cbsocial > ul > li").not("li.notsignedin").click(function(c)
- {
- socialAction.showDropDown($(this), 1)
- });
- $("#cbsocial > ul > li > span").click(function(d)
- {
- var c = $(this).parent();
- if (c.hasClass("stuck"))
- {
- socialAction.hideDropDown($(this).parent(), 1);
- d.stopPropagation()
- }
- });
- socialAction.stuckMenu = 0
- }
- if (socialAction.maintenanceMode >= 2)
- {
- $("#cbsocial > ul > li > span.maintenance").hover(function(c)
- {
- c.stopPropagation()
- });
- $("#cbsocial > ul > li > span.maintenance").click(function(c)
- {
- c.stopPropagation()
- })
- }
- if (socialAction.maintenanceMode < 2)
- {
- $("input.prefill, textarea.prefill").focus(function()
- {
- var c = $(this);
- if (!c.prop("already"))
- {
- c.removeClass("prefill");
- c.prop("already", c.val());
- c.val("")
- }
- });
- $("input.passwordclear").show();
- $("input.passwordnormal").hide();
- $("input.passwordclear").focus(function()
- {
- $(this).parent().children("input.passwordclear").hide();
- $(this).parent().children("input.passwordnormal").show();
- $(this).parent().children("input.passwordnormal").focus()
- });
- $("input.passwordnormal").blur(function()
- {
- if (!$(this).val())
- {
- $(this).parent().children("input.passwordnormal").hide();
- $(this).parent().children("input.passwordclear").show()
- }
- });
- $("#cbsocial li.tabs h3").click(function()
- {
- $(this).parent().siblings(".show").removeClass("show");
- $(this).parent().addClass("show");
- socialAction.resizeExtenders();
- $(this).parent().find("textarea#cbsocialcompose").focus()
- });
- $(window).scroll(function()
- {
- var g = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight, document.body.offsetHeight, document.documentElement.offsetHeight, document.body.clientHeight, document.documentElement.clientHeight);
- if ($(window).scrollTop() < g - window.innerHeight - 5)
- {
- return
- }
- var h;
- if (socialAction.lookingAtUserid > 0)
- {
- h = $("#cbsocial > div.viewuser > ul > li.show")
- }
- else
- {
- h = $("#cbsocial > ul > li.show.tabs > ul > li.show")
- }
- if (h.length != 1)
- {
- return
- }
- var c = h.attr("id");
- var e = h.children("ul").children("li").length;
- if (socialAction.lookingAtUserid > 0)
- {
- c = c.replace("_user", "")
- }
- var d = "";
- if (c == "cbsocialusersfollowing")
- {
- d = "getfollowing"
- }
- else
- {
- if (c == "cbsocialusersfollowers")
- {
- d = "getfollowers"
- }
- else
- {
- if (c == "cbsocialsnipstimeline")
- {
- d = "gettimeline"
- }
- else
- {
- if (c == "cbsocialsnipsmysnips")
- {
- d = "getmysnips"
- }
- else
- {
- if (c == "cbsocialsnipsstars")
- {
- d = "getstars"
- }
- else
- {
- if (c == "cbsocialuserssearch")
- {
- d = "searchusers"
- }
- else
- {
- if (c == "cbsocialsnipssearch")
- {
- d = "searchsnips"
- }
- else
- {
- if (c == "cbsocialconversations")
- {
- d = "getconversations"
- }
- }
- }
- }
- }
- }
- }
- }
- if (!d)
- {
- return
- }
- var i = d + socialAction.lookingAtUserid;
- var f = {
- offset: e,
- userid: socialAction.lookingAtUserid
- };
- if (d == "searchusers" || d == "searchsnips")
- {
- i += "_" + socialAction.lastSearch;
- f.search = socialAction.lastSearch
- }
- if (!socialAction.dataLoads[i])
- {
- socialAction.dataLoads[i] = 0
- }
- if (e <= (socialAction.dataLoads[i] + 0.5) * (d == "getstars" ? 20 : socialAction.loadEachTime))
- {
- return
- }
- socialAction.dataLoads[i] ++;
- socialAction.socialCall(d, f)
- });
- $("#cbsocial textarea").keyup(socialAction.charCounter);
- if (socialAction.isSignedIn())
- {
- $("#cbsocial").delegate("img.star", "click", function()
- {
- if (!$(this).hasClass("rated"))
- {
- return
- }
- var c = $(this).prevAll("img.star").andSelf().length;
- $(this).siblings("input[name='rating']").attr("value", c);
- $(this).parent()[0].fakeSubmit()
- });
- $("#cbsocial").delegate("img.star", "mouseenter", function()
- {
- if (!$(this).hasClass("rated"))
- {
- return
- }
- $(this).prevAll("img.star").andSelf().attr("src", socialAction.imageBase + "star_full.png");
- $(this).nextAll("img.star").attr("src", socialAction.imageBase + "star_empty.png")
- });
- $("#cbsocial").delegate("img.star", "mouseleave", function()
- {
- if (!$(this).hasClass("rated"))
- {
- return
- }
- $(this).parent().each(socialAction.setSnipRating)
- })
- }
- }
- if (socialAction.maintenanceMode < 2)
- {
- $("#cbsocial > div.obscureuser, #cbsocial a.closeuser").click(socialAction.closeUserView);
- $("#cbsocial > div.viewuser > ul > li > span").click(function(d)
- {
- var c = $(this).parent();
- if (c.attr("id"))
- {
- socialAction.showUserDropDown(c, 1);
- socialAction.lookingAtTab = c.attr("id")
- }
- });
- $("#cbsocial > div.viewuser > ul > li.backbutton > span").click(socialAction.closeUserView)
- }
- },
- signInMessageForTab: function(c, b)
- {
- if (!socialAction.signedin)
- {
- socialAction.makeElement("li", false, "nothingtoshow", c, "please sign up or sign in " + (b ? b : "to view this"))
- }
- },
- addDeleteButtonToForm: function(e, f, g, c)
- {
- if (!f)
- {
- f = "delete"
- }
- if (!g)
- {
- g = "delete this"
- }
- if (!c)
- {
- c = "deletethis"
- }
- socialAction.makeElement("input", false, false, e, false,
- {
- name: c,
- type: "hidden",
- value: ""
- });
- var b = {
- type: "button",
- value: f
- };
- var d = socialAction.makeElement("input", false, "deletebutton", e, false, b);
- $(d).click(new Function("if (confirm ('Are you sure you want to " + g + "?')) {$(this).siblings('input[name=" + c + "]').val('yes'); $(this).parent()[0].fakeSubmit();}"))
- },
- remakeDataLists: function(h, e, j, b)
- {
- var c = h ? h : socialAction.lookingAtUserid;
- var f = (new Date()).getTime() - 1000 * socialAction.timeLookupDelay;
- if (socialAction.signedin && !h)
- {
- socialAction.makeUserList("cbsocialusersfollowers", socialAction.user.id, "follower", f);
- socialAction.makeUserList("cbsocialusersfollowing", socialAction.user.id, "following", f);
- socialAction.makeUserList("cbsocialuserssuggested", socialAction.user.id, "suggested", f);
- socialAction.makeSnipList("cbsocialsnipstimeline", socialAction.user.id, "timeline", 0, j, b, f);
- socialAction.makeSnipList("cbsocialsnipsmysnips", socialAction.user.id, "mysnip", 0, j, b, f)
- }
- if (socialAction.signedin && h <= 0)
- {
- var i = socialAction.makeUserList("cbsocialuserssearch", socialAction.user.id, "search", f);
- var k = socialAction.makeSnipList("cbsocialsnipssearch", socialAction.user.id, "search", 0, j, b, f);
- if (h == -1)
- {
- var g = i || !k ? "#cbsocialuserssearch" : "#cbsocialsnipssearch";
- var d = i || !k ? "#cbsocialsnipssearch" : "#cbsocialuserssearch";
- $(g).addClass("show");
- $(d).removeClass("show")
- }
- }
- if (c > 0)
- {
- socialAction.makeUserList("cbsocialusersfollowers_user", c, "follower", f);
- socialAction.makeUserList("cbsocialusersfollowing_user", c, "following", f);
- socialAction.makeSnipList("cbsocialsnipsmysnips_user", c, "mysnip", 0, j, b, f);
- socialAction.makeSnipList("cbsocialsnipsmybest_user", c, "mysnip", 1, j, b, f);
- socialAction.drawUserHeader(c)
- }
- if (!h)
- {
- socialAction.makeSnipList("cbsocialsnipsstars", socialAction.user.id, "star", 1, j, b, f)
- }
- socialAction.resizeExtenders()
- },
- getUrlVars: function()
- {
- var e = [],
- d;
- var b = window.location.href.slice(window.location.href.indexOf("?") + 1).split("&");
- for (var c = 0; c < b.length; c++)
- {
- d = b[c].split("=");
- e.push(d[0]);
- e[d[0]] = d[1]
- }
- return e
- },
- getInfoFromUrl: function()
- {
- var b = {};
- var c = document.location.href.indexOf("www.cleverbot.com/mz/");
- if (c < 0)
- {
- return b
- }
- var f = document.location.href.substr(c + 21);
- if (f.indexOf("v/") == 1)
- {
- var d = f.split("/");
- var e = f.substring(0, 1);
- if (d.length >= 3 && e == "s")
- {
- b.verify = "signup"
- }
- else
- {
- if (d.length >= 3 && e == "e")
- {
- b.verify = "email"
- }
- else
- {
- if (d.length >= 3 && e == "u")
- {
- b.verify = "unsubscribe"
- }
- }
- }
- if (b.verify)
- {
- b.verifyuserid = d[1];
- b.verification = d[2].replace(/[^\w\d_\-].*$/, "")
- }
- }
- else
- {
- f = f.replace(/[^\w\d_\-\.@].*$/, "");
- if (f.length >= 3)
- {
- b.username = f
- }
- }
- return b
- },
- showMessage: function(d, e, c, f)
- {
- var b = $("#cbsocialmessage" + d);
- if (!b.length)
- {
- b = $(".cbsocialmessage" + d)
- }
- if (!b.length)
- {
- return
- }
- b.html((c ? "<span>" : "") + e + (c ? "</span>" : ""));
- if (f)
- {
- b.stop().show()
- }
- else
- {
- b.stop().show().delay(5000).hide(1000)
- }
- },
- debug: function(c, d, b)
- {
- if (c)
- {
- console.log(c)
- }
- if (d)
- {
- console.log(d)
- }
- },
- showDropDown: function(c, b)
- {
- if (c.hasClass("dontreshow"))
- {
- c.removeClass("dontreshow");
- return
- }
- if (b < 2 && c.hasClass("noshowonhover"))
- {
- return
- }
- if (b && c.hasClass("stuck"))
- {
- return
- }
- if (b)
- {
- socialAction.hideStuckDropDown();
- socialAction.stuckMenu = 1;
- c.addClass("stuck")
- }
- if (b == 2)
- {
- c.removeClass("noshowonhover")
- }
- c.addClass("show");
- $("#cbsocial .obscure").addClass("show");
- socialAction.resizeExtenders();
- socialAction.getRecentData()
- },
- hideDropDown: function(c, b)
- {
- if (b)
- {
- socialAction.stuckMenu = 0;
- c.removeClass("stuck")
- }
- $("#cbsocial .obscure").removeClass("show");
- c.removeClass("show")
- },
- hideAllDropDowns: function(b)
- {
- $("#cbsocial > ul > li.show").each(function()
- {
- if (b == 2)
- {
- $(this).addClass("dontreshow")
- }
- socialAction.hideDropDown($(this), b)
- })
- },
- hideStuckDropDown: function()
- {
- if (socialAction.stuckMenu)
- {
- socialAction.hideAllDropDowns(1)
- }
- },
- showUserDropDown: function(c, b)
- {
- c.siblings("li").removeClass("show");
- c.addClass("show");
- socialAction.resizeExtenders()
- },
- resizeExtenders: function()
- {
- if (socialAction.maintenanceMode == 2)
- {
- return
- }
- if (socialAction.makeCache)
- {
- return
- }
- $("#cbsocial .extend:visible").each(function()
- {
- var i = $(this);
- if (!i.prop("extra"))
- {
- var j = i.offset().top;
- var k = parseInt(i.css("top"));
- if (j == 0 && k > 0)
- {
- j = k
- }
- i.prop("extra", i.outerHeight() - i.height() + j)
- }
- });
- var g = $(window).height();
- var f = $(document).height();
- if (isNaN(g) || isNaN(f))
- {
- return
- }
- var b = 0;
- var e = $("#cbsocial .extend:visible li.show > ul");
- for (var c = 0; c < e.length; c++)
- {
- var d = $(e[c]);
- var h = d.height() + d.offset().top;
- if (h > b)
- {
- b = h
- }
- }
- $("#cbsocial .extend:visible").css("height", function()
- {
- var j = $(this);
- var i = b > 0 ? b : f;
- var k = (i > g ? i : g) - j.prop("extra");
- return k
- })
- },
- submitForm: function(e, c)
- {
- if (!c || !c.elements)
- {
- return
- }
- if ($(c).prop("stopsubmit") > 0)
- {
- return
- }
- var d = new Object();
- for (var b = 0; b < c.elements.length; b++)
- {
- if (c.elements[b].name && c.elements[b].value)
- {
- d[c.elements[b].name] = c.elements[b].value
- }
- }
- if (e == "addsnip" && d.text && socialAction.isDuplicateSnip(d.text, true))
- {
- return
- }
- socialAction.socialCall(e, d)
- },
- prepareToAddSnip: function(d)
- {
- var c = $("#cbsocialcompose");
- var b = c.parent().parent();
- b.siblings(".show").removeClass("show");
- b.addClass("show");
- c.prop("already", c.val());
- c.val(d);
- c.keyup();
- socialAction.showDropDown($("#cbsocialsnipsmenu"), 1)
- },
- addSnip: function(c, d, b)
- {
- if (!socialAction.signedin)
- {
- return
- }
- if (socialAction.user.autosnip < 1)
- {
- return
- }
- if (b.length > socialAction.textareaMaxLengthSnip)
- {
- b = b.substr(0, socialAction.textareaMaxLengthSnip) + "..."
- }
- if (socialAction.isDuplicateSnip(b, false))
- {
- return
- }
- socialAction.socialCall("addsnip",
- {
- type: c,
- title: d,
- text: b
- })
- },
- isDuplicateSnip: function(d, b)
- {
- var f = 0;
- for (var c in socialAction.allsnips)
- {
- var e = socialAction.allsnips[c];
- if (e.parentid == 0 && e["mysnip" + socialAction.user.id] && e.sniptext == d)
- {
- f = c
- }
- }
- if (f > 0 && b)
- {
- alert("This snip appears to be a duplicate of a previous one and so will not be posted.")
- }
- return f
- },
- charCounter: function()
- {
- var e = "";
- var d = $(this).val().length;
- var b = $(this).attr("id") == "cbsocialcompose";
- var c = b ? socialAction.textareaMaxLengthSnip : socialAction.textareaMaxLength;
- if (b)
- {
- $(this).parent().prop("stopsubmit", d > c ? 1 : 0);
- if (d > c)
- {
- $(this).siblings("input[type=submit]").addClass("stopsubmit")
- }
- else
- {
- $(this).siblings("input[type=submit]").removeClass("stopsubmit")
- }
- }
- else
- {
- if (d > c)
- {
- d = c;
- $(this).val($(this).val().substr(0, d))
- }
- }
- if (d > c * 0.8)
- {
- e += d + " of " + c
- }
- $("#cbsocial #" + $(this).attr("id") + "charcount").html(e)
- },
- getRecentData: function()
- {
- var b = socialAction.timeLookupCounter <= 0;
- socialAction.timeLookupCounter = socialAction.timeLookupCounterStart;
- if (b)
- {
- socialAction.getRecentDataContinue()
- }
- },
- getRecentDataContinue: function()
- {
- if (!socialAction.isSignedIn())
- {
- return
- }
- if (!socialAction.timeServer || !socialAction.timeLookupDelay)
- {
- return
- }
- if (socialAction.timeLookupCounter <= 0)
- {
- return
- }
- socialAction.timeLookupCounter--;
- setTimeout(socialAction.getRecentDataInner, socialAction.timeLookupDelay * 1000)
- },
- getRecentDataInner: function()
- {
- socialAction.socialCall("getrecent",
- {
- sincedate: socialAction.timeServer
- }, true)
- },
- getHowManyEachTime: function(d)
- {
- var b = Math.max(document.body ? document.body.scrollHeight : 0, document.documentElement ? document.documentElement.scrollHeight : 0, document.body ? document.body.offsetHeight : 0, document.documentElement ? document.documentElement.offsetHeight : 0, document.body ? document.body.clientHeight : 0, document.documentElement ? document.documentElement.clientHeight : 0, document.height, socialAction.loadEachTime);
- var c = ((b ? b : 0) / 70) - 1;
- if (c < socialAction.loadEachTime)
- {
- return socialAction.loadEachTime
- }
- if (!d)
- {
- d = 10
- }
- return Math.ceil(c / d) * d
- },
- getUserData: function(b, d)
- {
- if (socialAction.allusers[b] && socialAction.allusers[b].hasFullData)
- {
- socialAction.displayUserView(b)
- }
- else
- {
- var c = {};
- if (b)
- {
- c.userid = b
- }
- else
- {
- if (d)
- {
- c.username = d
- }
- else
- {
- return
- }
- }
- c.howmany = socialAction.getHowManyEachTime(5);
- socialAction.socialCall("getuser", c)
- }
- },
- createBgGradient: function(b, d, c)
- {
- $(b).css("background-color", c);
- $(b).css("background", "-webkit-gradient(linear, 0% 0%, 0% 100%, from(" + d + "), to(" + c + "))");
- $(b).css("background", "-webkit-linear-gradient(bottom, " + d + ", " + c + ")");
- $(b).css("background", "-moz-linear-gradient(bottom, " + d + ", " + c + ")");
- $(b).css("background", "-ms-linear-gradient(bottom, " + d + ", " + c + ")");
- $(b).css("background", "-o-linear-gradient(bottom, " + d + ", " + c + ")")
- },
- drawUserHeader: function(b)
- {
- var c = socialAction.allusers[b];
- if (!c)
- {
- return
- }
- var d = $("#cbsocial div.viewuser div.header");
- d.empty();
- socialAction.makeUserSnipDetails(d, c, null, socialAction.user.id != c.id, false, true)
- },
- displayUserView: function(c, h, f)
- {
- var d = socialAction.allusers[c];
- if (!d)
- {
- return
- }
- if (d.id == socialAction.lookingAtUserid)
- {
- return
- }
- d.hasFullData = true;
- var b = $("#cbsocial div.obscureuser");
- var g = $("#cbsocial div.viewuser");
- g.attr("id", "viewuser" + c);
- var i = $("#cbsocial div.viewuser div.header");
- g.css("background-image", "");
- i.removeClass("noimage");
- i.removeClass("noheadercolourborder");
- i.css("background-color", "");
- b.removeClass("noheadercolour");
- socialAction.drawUserHeader(c);
- if (!d.headerlocation)
- {
- i.addClass("noimage")
- }
- else
- {
- g.css("background-image", "url(" + d.headerlocation + ")");
- if (!d.headercolourborder)
- {
- b.addClass("noheadercolourborder")
- }
- else
- {
- b.css("background-color", d.headercolourborder)
- }
- if (d.headercolour)
- {
- i.css("background-color", d.headercolour)
- }
- }
- if (typeof h == "undefined")
- {
- socialAction.lookingAtHistory.push(
- {
- userid: socialAction.lookingAtUserid,
- tab: socialAction.lookingAtTab
- })
- }
- socialAction.lookingAtUserid = d.id;
- socialAction.lookingAtTab = h ? h : "";
- if (socialAction.lookingAtHistory.length >= 2)
- {
- $("#cbsocial div.viewuser > ul > li.backbutton").show()
- }
- else
- {
- if (!socialAction.makeCache)
- {
- $("#cbsocial div.viewuser > ul > li.backbutton").hide()
- }
- }
- socialAction.remakeDataLists(d.id);
- $("#cbsocial div.viewuser > ul > li").removeClass("show");
- var e = h ? ("#" + h) : "li.showdefault";
- $("#cbsocial div.viewuser > ul > " + e).addClass("show");
- $("#cbsocial div.viewuser").addClass("show");
- $("#cbsocial div.obscureuser").addClass("show");
- socialAction.resizeExtenders();
- if (!socialAction.makeCache)
- {
- window.scrollTo(0, 0)
- }
- },
- displaySnipView: function(b)
- {
- $("#cbsocial > div.viewuser > ul").addClass("showonesnip");
- $("#cbsocial > div.viewuser > ul li.show").removeClass("show");
- $("#cbsocial > div.viewuser > ul li.onesnip").addClass("show");
- socialAction.makeSnipList("cbsocialsnipsonesnip_user", 0, "onesnip", 0, 0, b.id)
- },
- closeUserView: function()
- {
- if (socialAction.fromCache && socialAction.lookingAtHistory.length <= 1)
- {
- window.location.href = "http://www.cleverbot.com/"
- }
- else
- {
- socialAction.closeUserViewInner()
- }
- },
- closeUserViewInner: function()
- {
- var b = socialAction.lookingAtHistory.length ? socialAction.lookingAtHistory.pop() :
- {};
- if (b.userid)
- {
- socialAction.displayUserView(b.userid, b.tab)
- }
- else
- {
- socialAction.lookingAtUserid = 0;
- socialAction.lookingAtTab = "";
- $("#cbsocial > div.obscureuser").removeClass("show");
- $("#cbsocial > div.viewuser").removeClass("show")
- }
- },
- convertDateToSeconds: function(c)
- {
- var b = Date.parse(c);
- if (isNaN(b))
- {
- return -1
- }
- b -= socialAction.timeDifference;
- return b
- },
- getFullDate: function(i, f)
- {
- if (!i)
- {
- return "never"
- }
- var c = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
- var g = new Date();
- var b = i ? new Date(i) : g;
- var e = "";
- if (f && (b.getDate() + " " + b.getMonth() + " " + b.getFullYear()) == (g.getDate() + " " + g.getMonth() + " " + g.getFullYear()))
- {
- e += "Today "
- }
- else
- {
- e += b.getDate() + " " + c[b.getMonth()] + " ";
- if (!f || b.getFullYear() != g.getFullYear())
- {
- e += b.getFullYear() + " "
- }
- }
- var h = b.getMinutes();
- e += (f ? "at " : " ") + b.getHours() + ":" + ((h < 10 ? "0" : "") + h);
- return e
- },
- getSecondsSince: function(b)
- {
- return Math.round(((new Date()).getTime() - b) / 1000)
- },
- computeTimeSince: function(b)
- {
- if (b < 0)
- {
- return ""
- }
- b = socialAction.getSecondsSince(b);
- if (b < 0)
- {
- return ""
- }
- if (b <= 1)
- {
- return "now"
- }
- if (b < 60)
- {
- return b + "s"
- }
- b = Math.round(b / 60);
- if (b < 60)
- {
- return b + "m"
- }
- b = Math.round(b / 60);
- if (b < 60)
- {
- return b + "h"
- }
- b = Math.round(b / 24);
- if (b < 7)
- {
- return b + "d"
- }
- var c = Math.round(b / 7);
- if (c < 52)
- {
- return c + "w"
- }
- b = Math.round(b / 365);
- return b + "y"
- },
- setSnipRating: function()
- {
- var f = $(this).children("input[name=snipid]").attr("value");
- var h = socialAction.allsnips[f];
- if (!h)
- {
- return
- }
- var b = h.ratingstars + " from " + h.ratingscount + " rating";
- b += (h.ratingscount == 1 ? "" : "s") + ", ";
- b += h.ratingbyme > 0 ? ("rated " + h.ratingbyme + " by me") : "rate me!";
- var d = $(this).children("img.star");
- for (var e = 1; e <= d.length; e++)
- {
- var i = d.eq(e - 1);
- if (h.ratingbyme > 0)
- {
- i.removeClass("rated")
- }
- else
- {
- i.addClass("rated")
- }
- var g = h.ratingscountmax > 0 ? ("_" + Math.round(10 * h.ratingscount / h.ratingscountmax)) : "";
- var c = h.ratingstars >= e ? "full" : ((e - h.ratingstars) * 2 == 1 ? "half" : "empty");
- i.attr("src", socialAction.imageBase + "star_" + c + g + ".png");
- i.attr("title", b)
- }
- },
- shareSnip: function(c, b)
- {
- var e = socialAction.allsnips[b];
- if (!e)
- {
- return
- }
- var d = encodeURIComponent("http://www.cleverbot.com/");
- var g = encodeURIComponent("Snip! from Cleverbot");
- var f = encodeURIComponent(e.sniptext);
- switch (c)
- {
- case "email":
- window.location.href = "mailto:?subject=" + g + "&body=" + f;
- break;
- case "facebook":
- var g = "Snip! from Cleverbot";
- window.open("http://www.facebook.com/sharer/sharer.php?s=100&p[title]=" + g + "&p[summary]=" + f + "&p[url]=" + d, "", "width=626,height=436");
- break;
- case "twitter":
- f = f.replace(/%23cleverbot/g, "%40cleverbot");
- window.open("https://twitter.com/share?text=" + f, "", "menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600");
- break;
- case "gplus":
- window.open("https://plus.google.com/share?url=" + d, "", "menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600");
- break;
- case "tumblr":
- var g = "Snip! from Cleverbot";
- window.open("http://www.tumblr.com/share/link?url=" + d + "&name=" + g + "&description=" + f, "", "menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=500,width=600");
- break
- }
- },
- sortSnipsByTime: function(e, c)
- {
- var g = socialAction.allsnips[e].lookuporder;
- var f = socialAction.allsnips[c].lookuporder;
- if (g > 0 && f > 0)
- {
- return g - f
- }
- var h = socialAction.allsnips[c].sniptime - socialAction.allsnips[e].sniptime;
- return isNaN(h) ? 0 : h
- },
- sortSnipsByRating: function(e, c)
- {
- var f = socialAction.allsnips[c].ratingorder - socialAction.allsnips[e].ratingorder;
- return isNaN(f) ? 0 : (f == 0 ? socialAction.sortSnipsByTime(e, c) : f)
- },
- makeSnipList: function(A, h, g, H, E, C, v)
- {
- var u = $("#" + A).children("ul");
- u.children().remove();
- var n = new Array();
- var t = 0;
- for (var d in socialAction.allsnips)
- {
- var e = socialAction.allsnips[d];
- if (e.parentid > 0)
- {
- continue
- }
- if (g == "timeline" && !e["timeline" + h])
- {
- continue
- }
- if (g == "mysnip" && !e["mysnip" + h])
- {
- continue
- }
- if (g == "search" && e.snipsearch != socialAction.lastSearch)
- {
- continue
- }
- if (g == "star" && !e.star)
- {
- continue
- }
- if (g == "onesnip" && e.id != C)
- {
- continue
- }
- if (H && e.ratingstars < 2)
- {
- continue
- }
- if (e.ratingscount > t)
- {
- t = e.ratingscount
- }
- n.push(d)
- }
- n.sort(H ? socialAction.sortSnipsByRating : socialAction.sortSnipsByTime);
- var l = 180;
- var m = 0;
- for (var M = 0; M < n.length; M++)
- {
- var e = socialAction.allsnips[n[M]];
- var x = socialAction.allusers[e.userid];
- if (!x)
- {
- continue
- }
- var K = e.children ? e.children.length : 0;
- var I = parseInt(e.numchildren);
- var N = "socialdata parentsnip" + e.id;
- if (e.userid != socialAction.user.id && e.sniptime > v && !e["recentshown" + A])
- {
- m++;
- N += " recent";
- e["recentshown" + A] = 1
- }
- if (I == 0)
- {
- N += " nochildren"
- }
- var b = socialAction.makeElement("li", false, N, u);
- e.ratingscountmax = t;
- socialAction.makeUserSnipDetails(b, x, e, true, true, false);
- if (K > 0)
- {
- var o = socialAction.makeElement("ul", false, false, b);
- for (var L = 0; L < K; L++)
- {
- var O = socialAction.allsnips[e.children[L]];
- if (!O)
- {
- continue
- }
- var q = socialAction.allusers[O.userid];
- if (!q)
- {
- continue
- }
- var D = L > 0 && socialAction.getSecondsSince(O.sniptimeoriginal) > l;
- var N = "socialdata";
- if (O.sniptime > v && !e["recentshown" + A])
- {
- m++;
- N += " recent";
- e["recentshown" + A] = 1
- }
- if (D)
- {
- N += " oldsnip"
- }
- var k = socialAction.makeElement("li", false, N, o);
- socialAction.makeUserSnipDetails(k, q, O, q.id != x.id, false, false);
- socialAction.makeElement("div", false, "clear", k)
- }
- }
- var J = socialAction.makeElement("p", false, "replymore", b);
- var s = null;
- if (!x.isstats && socialAction.isSignedIn())
- {
- s = socialAction.makeElement("span", false, "reply", J, "reply");
- $(s).click(new Function("socialAction.replyingtoid=" + e.id + "; var f = $(this).parent().siblings ('form.replyform'); f.toggle (500); f.children('textarea').focus();"));
- socialAction.makeElement("span", "cbsocialreplyarea" + e.id + "charcount", "charcount", s)
- }
- if (socialAction.isSignedIn() && I > 1 && K < I)
- {
- var w = I - K;
- if (w > socialAction.loadEachTime)
- {
- w = socialAction.loadEachTime
- }
- var B = socialAction.makeElement("span", false, "moreless", J, w + " more",
- {
- title: I + " in total"
- });
- $(B).prop("snipid", e.id);
- $(B).click(function()
- {
- var Q = socialAction.allsnips[$(this).prop("snipid")];
- if (!Q)
- {
- return
- }
- var i = Q.children ? Q.children.length : 0;
- var j = {
- snipid: Q.id,
- offset: i
- };
- socialAction.socialCall("getreplies", j)
- })
- }
- if (!x.isstats && socialAction.isSignedIn())
- {
- var P = ["email", "facebook", "twitter", "gplus", "tumblr"];
- var p = socialAction.makeElement("div", false, "sharebuttons", J);
- for (var L = 0; L < P.length; L++)
- {
- var G = socialAction.makeElement("div", false, P[L], p);
- $(G).click(new Function("socialAction.shareSnip('" + P[L] + "'," + e.id + ")"))
- }
- }
- socialAction.makeElement("p", "", "message cbsocialmessagesnip" + e.id, b);
- if (!x.isstats && socialAction.isSignedIn())
- {
- var c = socialAction.makeElement("form", false, "replyform", b, false, "addsnip");
- socialAction.makeElement("input", false, false, c, false,
- {
- name: "parentid",
- type: "hidden",
- value: e.id
- });
- socialAction.makeElement("input", false, false, c, false,
- {
- name: "parentuserid",
- type: "hidden",
- value: e.userid
- });
- socialAction.makeElement("input", false, "cbsocialbuttonreply", c, false,
- {
- type: "submit",
- value: "reply"
- });
- var f = socialAction.makeElement("textarea", "cbsocialreplyarea" + e.id, false, c, false,
- {
- name: "text",
- rows: 3
- });
- $(f).keyup(socialAction.charCounter);
- if (e.id != socialAction.replyingtoid)
- {
- $(c).hide()
- }
- }
- socialAction.makeElement("div", false, "clear", b)
- }
- var z = 0;
- if (h && socialAction.allusers[h])
- {
- if (g == "mysnip" && !H)
- {
- z = socialAction.allusers[h].numsnips
- }
- }
- if (z < n.length)
- {
- z = n.length
- }
- if (g == "search" && (n.length % socialAction.loadEachTime == 0))
- {
- z += "+"
- }
- u.siblings().children("span.unbold").html(": " + z);
- u.siblings().children("span.bold").html(z);
- u.siblings("h3").attr("title", z + " snips");
- if (m)
- {
- u.find("li.recent").removeClass("recent", 5000)
- }
- if (!n.length)
- {
- socialAction.makeElement("li", false, "nothingtoshow", u, "no snips yet!")
- }
- return n.length
- },
- makeUserSnipDetails: function(b, t, E, H, v, h, s)
- {
- var f = socialAction.makeElement("div", false, "followrateforms", b);
- if (H && t && !t.isstats)
- {
- var A = socialAction.user.id;
- var c = t["following" + A];
- var i = socialAction.makeElement("form", false, false, f, false, c ? "unfollow" : "follow");
- var g = t.id == A;
- socialAction.makeElement("input", false, false, i, false,
- {
- name: "followingid",
- type: "hidden",
- value: t.id
- });
- var q = c ? "following" : (g ? "this is me" : "follow");
- if (!socialAction.isSignedIn())
- {
- socialAction.makeElement("input", false, "signintofollow", i, false,
- {
- type: "button",
- value: "sign in to follow"
- })
- }
- else
- {
- var n = socialAction.makeElement("input", false, "followornot" + (g ? " thisisme" : "") + (c ? " following" : ""), i, false,
- {
- type: "submit",
- value: q
- });
- if (c)
- {
- $(n).hover(function()
- {
- if ($(this).val() == "following")
- {
- $(this).addClass("unfollow");
- $(this).val("unfollow")
- }
- }, function()
- {
- if ($(this).val() == "unfollow")
- {
- $(this).removeClass("unfollow");
- $(this).val("following")
- }
- })
- }
- }
- if (h)
- {
- var l = encodeURIComponent("I want to report the user " + t.username + " because...");
- var I = encodeURIComponent("userid=" + (socialAction.isSignedIn() ? socialAction.user.id : "not signed in") + ", reporting user=" + t.id + " " + t.username);
- var G = "http://www.cleverbot.com/contact?extra=" + I + "&pre=" + l;
- if (socialAction.isSignedIn())
- {
- G += "&email=" + socialAction.user.email
- }
- var x = socialAction.makeElement("a", false, "reportuser", f, "report this user",
- {
- href: G,
- target: "_blank"
- });
- if (!socialAction.makeCache)
- {
- $(x).click(function()
- {
- socialAction.socialCall("reportuser",
- {
- userid: t.id
- })
- })
- }
- }
- }
- if (v && E && !t.isstats)
- {
- var D = socialAction.makeElement("form", false, false, f, false, "rate");
- socialAction.makeElement("input", false, false, D, false,
- {
- name: "snipid",
- type: "hidden",
- value: E.id
- });
- socialAction.makeElement("input", false, false, D, false,
- {
- name: "rating",
- type: "hidden",
- value: 0
- });
- for (var B = 1; B <= 3; B++)
- {
- socialAction.makeElement("img", false, "star", D)
- }
- $(D).each(socialAction.setSnipRating)
- }
- var d = t.username ? t.username : "";
- if (d.length > 25)
- {
- d = d.substring(0, 24) + "..."
- }
- var o = "www.cleverbot.com/me/" + t.username;
- var m = "www.cleverbot.com/me/" + d;
- var u = {};
- if (!socialAction.fromCache)
- {
- u.onclick = "socialAction.getUserData(" + (t ? t.id : E.userid) + ");return false;"
- }
- u.href = "http://" + o;
- var J = socialAction.makeElement("a", false, false, b, false, u);
- socialAction.makeElement("img", false, false, J, false,
- {
- src: t.photolocation
- });
- var w = socialAction.makeElement("p", false, false, b);
- var z = !t.isstats && socialAction.canAdminister() ? "*" : "";
- var C = socialAction.makeElement("span", false, "fullname", w, t.fullname + z);
- if (z)
- {
- $(C).click(new Function("socialAction.administerUserSnip(" + (t ? t.id : E.userid) + ",0);"))
- }
- else
- {
- if (!h && !socialAction.makeCache)
- {
- $(C).click(new Function("socialAction.getUserData(" + (t ? t.id : E.userid) + ");"))
- }
- }
- if (!h && t && t.fullname && t.username && t.fullname.length + t.username.length > 30)
- {
- socialAction.makeElement("br", false, false, w)
- }
- socialAction.makeElement("a", false, "username", w, "@" + d, u);
- if (E && !t.isstats)
- {
- C = socialAction.makeElement("span", false, "timesince", w, socialAction.computeTimeSince(E.sniptimeoriginal) + z,
- {
- title: "snipped " + socialAction.getFullDate(E.createddate, 1)
- });
- if (E.id && z)
- {
- $(C).click(new Function("socialAction.administerUserSnip(0," + E.id + ");"))
- }
- var e = socialAction.makeElement("p", false, false, b, socialAction.addLinksToText(E.sniptext));
- if (!socialAction.makeCache)
- {
- $(e).click(function()
- {
- socialAction.displaySnipView(E)
- })
- }
- if (E.userid == socialAction.user.id)
- {
- var k = socialAction.makeElement("form", false, false, e, false, "savesnip");
- socialAction.makeElement("input", false, false, k, false,
- {
- type: "hidden",
- name: "id",
- value: E.id
- });
- socialAction.makeElement("input", false, false, k, false,
- {
- type: "hidden",
- name: "userid",
- value: E.userid
- });
- socialAction.makeElement("input", false, false, k, false,
- {
- type: "hidden",
- name: "onlyifme",
- value: "yes"
- });
- socialAction.addDeleteButtonToForm(k, "delete", "delete this snip")
- }
- }
- else
- {
- if (!h && s && t[s])
- {
- socialAction.makeElement("span", false, "timesince", w, socialAction.computeTimeSince(t[s.replace("date", "time")]),
- {
- title: "since " + socialAction.getFullDate(t[s], 1)
- })
- }
- if (h)
- {
- socialAction.makeElement("a", false, false, b, m + "<br/>" + t.location,
- {
- href: "http://" + o,
- target: "_blank"
- })
- }
- socialAction.makeElement("p", false, false, b, t.biography)
- }
- },
- addLinksToText: function(c)
- {
- if (!c)
- {
- return ""
- }
- var b = /\b(?:https?|ftp):\/\/[a-z0-9-+&@#\/%?=~_|!:,.;]*[a-z0-9-+&@#\/%=~_|]/gim;
- var d = /(^|[^\/])(www\.[\S]+(\b|$))/gim;
- return c.replace(b, '<a href="$&" target="_blank">$&</a>').replace(d, '$1<a href="http://$2" target="_blank">$2</a>')
- },
- administerUserSnip: function(h, k)
- {
- var d = h ? socialAction.allusers[h] : null;
- var f = k ? socialAction.allsnips[k] : null;
- if (!d && !f)
- {
- return
- }
- var l = f ? "snip" : "person";
- var e = $("#cbsocial .admin");
- e.empty();
- socialAction.makeElement("h3", false, false, e, "Administer a " + l);
- var b = "";
- if (d)
- {
- b += "User ID: " + d.id + "<br/>";
- b += "Signed up: " + socialAction.getFullDate(d.createddate) + "<br/>";
- b += "Verified: " + socialAction.getFullDate(d.verificationdate) + "<br/>";
- b += "Last login: " + socialAction.getFullDate(d.logindate) + "<br/>";
- b += "Num logins: " + d.logintimes + "<br/>";
- b += "Num reports: " + d.reporttimes + "<br/>";
- if (d["followingdate" + socialAction.user.id])
- {
- b += "I'm following since: " + socialAction.getFullDate(d["followingdate" + socialAction.user.id]) + "<br/>"
- }
- if (d["followerdate" + socialAction.user.id])
- {
- b += "Follower of me since: " + socialAction.getFullDate(d["followerdate" + socialAction.user.id]) + "<br/>"
- }
- }
- else
- {
- b += "Snip ID: " + f.id + "<br/>";
- if (f.parentid)
- {
- b += "In reply to ID: " + f.parentid + "<br/>"
- }
- b += "Snipped: " + socialAction.getFullDate(f.sniptimeoriginal, true) + "<br/>";
- b += "By: @" + f.username + " (" + f.fullname + ")<br/>";
- b += "Rated: " + f.ratingstars + " from " + f.ratingscount + " ratings<br/>";
- b += "Rating score: " + f.ratingorder + " = " + f.ratingexplanation + "<br/>"
- }
- socialAction.makeElement("p", false, false, e, b);
- var j = socialAction.makeElement("form", false, false, e, false, (l == "person" ? "saveuser" : "savesnip"));
- socialAction.makeElement("input", false, false, j, false,
- {
- name: "id",
- type: "hidden",
- value: d ? d.id : f.id
- });
- socialAction.makeElement("input", false, false, j, false,
- {
- name: "table",
- type: "hidden",
- value: d ? "users" : "snips"
- });
- if (d)
- {
- socialAction.makeElement("label", false, false, j, "User name");
- socialAction.makeElement("input", false, false, j, false,
- {
- name: "username",
- type: "text",
- value: d.username
- });
- socialAction.makeElement("label", false, false, j, "Full name");
- socialAction.makeElement("input", false, false, j, false,
- {
- name: "fullname",
- type: "text",
- value: d.fullname
- });
- if (!d.verificationdate)
- {
- socialAction.makeElement("label", false, false, j, "Verification?");
- socialAction.makeElement("select", false, false, j, ["no", "resend", "verify"],
- {
- name: "resendverification"
- })
- }
- socialAction.makeElement("label", false, false, j, "Email");
- socialAction.makeElement("input", false, false, j, false,
- {
- name: "email",
- type: "text",
- value: d.email
- });
- socialAction.makeElement("label", false, false, j, "Suggested user");
- var m = new Array("no");
- for (var g = 1; g < 20; g++)
- {
- m.push(g)
- }
- socialAction.makeElement("select", false, false, j, m,
- {
- name: "suggested",
- value: d.suggested > 0 ? d.suggested : "no"
- });
- socialAction.makeElement("br", false, false, j);
- socialAction.makeElement("label", false, false, j, "Biography");
- socialAction.makeElement("textarea", false, false, j, d.biography,
- {
- name: "biography"
- })
- }
- else
- {
- socialAction.makeElement("input", false, false, j, false,
- {
- name: "id",
- type: "hidden",
- value: f.id
- });
- socialAction.makeElement("input", false, false, j, false,
- {
- name: "userid",
- type: "hidden",
- value: f.userid
- });
- socialAction.makeElement("input", false, false, j, false,
- {
- name: "parentid",
- type: "hidden",
- value: f.parentid
- });
- socialAction.makeElement("label", false, false, j, "Banned from stars?");
- socialAction.makeElement("select", false, false, j, ["no", "yes"],
- {
- name: "unstar",
- value: (f.unstar > 0 ? "yes" : "no")
- });
- socialAction.makeElement("br", false, false, j);
- socialAction.makeElement("label", false, false, j, "Snip");
- socialAction.makeElement("textarea", false, false, j, f.sniptext,
- {
- name: "sniptext"
- })
- }
- socialAction.makeElement("input", false, false, j, false,
- {
- type: "submit",
- value: "save " + l
- });
- var c = socialAction.makeElement("input", false, false, j, false,
- {
- type: "button",
- value: "cancel"
- });
- $(c).click(function()
- {
- $("#cbsocial .admin").removeClass("show")
- });
- socialAction.addDeleteButtonToForm(j, "delete", "delete this " + l);
- e.addClass("show")
- },
- sortUsersByFollowDate: function(f, c)
- {
- var i = socialAction.allusers[f].lookuporder;
- var h = socialAction.allusers[c].lookuporder;
- if (i > 0 && h > 0)
- {
- return i - h
- }
- if (socialAction.sortFieldTemp)
- {
- var j = socialAction.allusers[c][socialAction.sortFieldTemp] - socialAction.allusers[f][socialAction.sortFieldTemp];
- if (j)
- {
- return j
- }
- }
- var e = socialAction.allusers[f].username;
- var g = socialAction.allusers[c].username;
- return e && g ? e.localeCompare(g) : 0
- },
- sortUsersBySuggested: function(e, c)
- {
- var d = socialAction.allusers[e].suggested;
- var f = socialAction.allusers[c].suggested;
- return d - f
- },
- makeUserList: function(g, j, o, m)
- {
- var q = $("#" + g).children("ul");
- q.children().remove();
- var b = socialAction.user && socialAction.user.userdidsuggestions ? "suggestedpersonal" : "suggested";
- var f = new Array();
- for (var l in socialAction.allusers)
- {
- var e = socialAction.allusers[l];
- if (e.location == "prereg")
- {
- continue
- }
- if (o == "follower" && !e["followerdate" + j])
- {
- continue
- }
- if (o == "following" && !e["followingdate" + j])
- {
- continue
- }
- if (o == "suggested" && (!e[b] || e[b] == 0 || e["following" + j]))
- {
- continue
- }
- if (o == "search" && e.usersearch != socialAction.lastSearch)
- {
- continue
- }
- if (o == "follower" && e["followerdate" + j])
- {
- e["followertime" + j] = socialAction.convertDateToSeconds(e["followerdate" + j])
- }
- if (o == "following" && e["followingdate" + j])
- {
- e["followingtime" + j] = socialAction.convertDateToSeconds(e["followingdate" + j])
- }
- f.push(l)
- }
- var h = (o == "follower" || o == "following") ? (o + "date" + j) : "";
- socialAction.sortFieldTemp = h.replace("date", "time");
- f.sort(o == "suggested" ? socialAction.sortUsersBySuggested : socialAction.sortUsersByFollowDate);
- socialAction.sortFieldTemp = "";
- var n = 0;
- for (var k = 0; k < f.length; k++)
- {
- var e = socialAction.allusers[f[k]];
- if (!e)
- {
- continue
- }
- if (o == "follower" && !e["follower" + j])
- {
- continue
- }
- if (o == "following" && !e["following" + j])
- {
- continue
- }
- if (o == "suggested" && (e.suggested == 0 || e["following" + j]))
- {
- continue
- }
- if (o == "search" && e.usersearch != socialAction.lastSearch)
- {
- continue
- }
- var c = "socialdata";
- if (o == "follower" && e.followertime > m && !e["recentshown" + g])
- {
- n++;
- c += " recent";
- e["recentshown" + g] = 1
- }
- if (o == "following" && e.followingtime > m)
- {
- n++;
- c += " recent"
- }
- var d = socialAction.makeElement("li", false, c, q);
- socialAction.makeUserSnipDetails(d, e, null, true, false, false, h);
- socialAction.makeElement("div", false, "clear", d)
- }
- var p = 0;
- if (j && socialAction.allusers[j])
- {
- if (o == "follower")
- {
- p = socialAction.allusers[j].numfollowers
- }
- if (o == "following")
- {
- p = socialAction.allusers[j].numfollowing
- }
- }
- if (p < f.length)
- {
- p = f.length
- }
- if (o == "search" && (f.length % socialAction.loadEachTime == 0))
- {
- p += "+"
- }
- q.siblings().children("span.unbold").html(": " + p);
- q.siblings().children("span.bold").html(p);
- q.siblings("h3").attr("title", p + " people");
- if (!f.length)
- {
- socialAction.makeElement("li", false, "nothingtoshow", q, "no users found")
- }
- if (o == "suggested")
- {
- if (f.length)
- {
- q.parent().show()
- }
- else
- {
- q.parent().hide();
- if ($("#cbsocialusersmenu").hasClass("show"))
- {
- $("#cbsocialusersfollowing h3").click()
- }
- }
- }
- if (n)
- {
- q.children("li.recent").removeClass("recent", 5000)
- }
- return f.length
- },
- getCookieValue: function(c)
- {
- var d = document.cookie.indexOf(c + "=");
- if (d < 0)
- {
- return ""
- }
- d += c.length + 1;
- var b = document.cookie.indexOf(";", d);
- return b < 0 ? document.cookie.substr(d) : document.cookie.substr(d, b - d)
- },
- setCookieValue: function(b, d, c)
- {
- var e = new Date();
- e.setDate(e.getDate() + c);
- var f = escape(d) + ((c == null) ? "" : ";expires=" + e.toUTCString());
- document.cookie = b + "=" + f
- },
- onRespReplacement: function()
- {
- socialAction.onRespBeforeSocial();
- if ((typeof iC == "undefined") || (typeof sID == "undefined") || (typeof stimulus == "undefined") || (typeof reply == "undefined"))
- {
- return
- }
- var b = socialAction.getCookieValue("AIS");
- socialAction.addToConversationLog(b, iC, sID, stimulus, reply)
- },
- startOrContinueConversation: function(g, d)
- {
- socialAction.hideAllDropDowns(2);
- if (typeof dispResp == "undefined" || typeof sID == "undefined")
- {
- return
- }
- if (socialAction.hassnips)
- {
- snipAction.closeSnipBox()
- }
- if (d && sID.length > 2)
- {
- return
- }
- socialAction.conversationCurrentId = g;
- if (g > 0)
- {
- socialAction.remakeConversationList(g)
- }
- var h = g ? socialAction.allconversations[g] : "";
- var c = new Array();
- if (h && h.text)
- {
- var b = h.text.split("\n");
- for (var e = b.length - 1; e >= 0; e--)
- {
- var f = b[e].split("\t");
- if (f.length >= 2)
- {
- c.push(f[1]);
- c.push(f[0])
- }
- }
- }
- for (var e = 1; e <= 8; e++)
- {
- window["m" + e] = c.length > e - 1 ? c[e - 1] : ""
- }
- if (h)
- {
- socialAction.setCookieValue("ais", h.ais, 3);
- replyPrev = m1;
- sID = h.sessionid;
- if (typeof iC != "undefined")
- {
- socialAction.conversationLastInteraction = iC
- }
- socialAction.trackInGoogle(d ? "conversation_continue_auto" : "continue_conversation_manual")
- }
- else
- {
- socialAction.setCookieValue("cleverbotref", "", -1);
- socialAction.setCookieValue("ais", "", -1);
- replyPrev = "";
- sID = "";
- socialAction.trackInGoogle("conversation_new")
- }
- typData = "";
- reply = m1;
- R = 3;
- script = F;
- dispResp();
- stimFocus()
- },
- setTweaksInPage: function(d, c, b)
- {
- window.tweak1 = d;
- window.tweak2 = c;
- window.tweak3 = b
- },
- addToConversationLog: function(d, b, f, c, h)
- {
- if (!socialAction.signedin)
- {
- return
- }
- if (socialAction.user.logconvs < 1)
- {
- return
- }
- if (!f || !c || !h)
- {
- return
- }
- if (b == socialAction.conversationLastInteraction)
- {
- return
- }
- if (!socialAction.conversationCurrentId)
- {
- for (var g in socialAction.allconversations)
- {
- if (socialAction.allconversations[g].sessionid == f)
- {
- socialAction.conversationCurrentId = g
- }
- }
- }
- c = c.replace(/&/g, "&");
- h = h.replace(/&/g, "&");
- var e = {
- ais: d,
- conversationid: socialAction.conversationCurrentId,
- user: socialAction.unicodeConvert(c),
- bot: socialAction.unicodeConvert(h),
- numinteractions: b,
- source: window.location.hostname,
- tweak1: socialAction.user.tweak1,
- tweak2: socialAction.user.tweak2,
- tweak3: socialAction.user.tweak3
- };
- if (socialAction.conversationLastSessionId != f)
- {
- e.sessionid = f
- }
- if (socialAction.voteDistance == 0)
- {
- e.vote = socialAction.vote
- }
- if (h.substr(h.length - 1) == "." && h.substr(h.length - 2) != ".")
- {
- h = h.substr(0, h.length - 1)
- }
- if (!socialAction.conversationCurrentId)
- {
- e.title = h
- }
- socialAction.conversationLastSessionId = f;
- socialAction.conversationLastInteraction = b;
- socialAction.socialCall("addtolog", e, true);
- if (socialAction.conversationCurrentId)
- {
- $("li.conversation" + socialAction.conversationCurrentId).addClass("current");
- if (socialAction.voteDistance == 0 && socialAction.vote > 0 && socialAction.allconversations[socialAction.conversationCurrentId])
- {
- socialAction.allconversations[socialAction.conversationCurrentId]["vote" + socialAction.vote] ++
- }
- socialAction.voteDistance++
- }
- },
- unicodeConvert: function(d)
- {
- var c = "";
- for (var b = 0; b <= d.length; b++)
- {
- if (d.charAt(b) == "|")
- {
- var e = parseInt(d.substring(b + 1, b + 5), 16);
- if (e > 0)
- {
- c += String.fromCharCode(e);
- b += 4
- }
- else
- {
- c += d.charAt(b)
- }
- }
- else
- {
- c += d.charAt(b)
- }
- }
- return c
- },
- formatConversationLine: function(c, f, e)
- {
- if (f === false)
- {
- var d = c.split("\t");
- if (d.length >= 2)
- {
- c = d[0];
- f = d[1]
- }
- }
- if (!c || !f)
- {
- return ""
- }
- var b = socialAction.user ? socialAction.user.username : "";
- r = "";
- if (c != "{pass}")
- {
- r += '<tr class="user' + (e ? " early" : "") + '"><td>' + b + ": <span>" + socialAction.unicodeConvert(c) + "</span><br/></td></tr>"
- }
- r += '<tr class="bot' + (e ? " early" : "") + '"><td>Cleverbot: <span> ' + socialAction.unicodeConvert(f) + "</span><br/></td></tr>";
- return r
- },
- getConversationLineVote: function(b)
- {
- var c = b.split("\t");
- return c.length >= 3 ? parseInt(c[2]) : 0
- },
- sortConversationsByReverseTime: function(d, c)
- {
- return c - d
- },
- remakeConversationList: function(j, q)
- {
- elid = "cbsocialconversations";
- var m = $("#" + elid).children("ul");
- m.children().remove();
- var w = new Array();
- for (var u in socialAction.allconversations)
- {
- if (u > 0)
- {
- w.push(u)
- }
- }
- w.sort(socialAction.sortConversationsByReverseTime);
- var s = socialAction.makeElement("li", false, "conversation", m);
- if (socialAction.user.logconvs < 1)
- {
- var h = socialAction.makeElement("span", false, "newconversation", s, "conversation logging is off");
- socialAction.makeElement("p", false, false, s, "Your conversations are not currently being logged. Turn on logging in your account settings, available from the top right corner of the screen.")
- }
- else
- {
- var h = socialAction.makeElement("span", false, "newconversation", s, "new conversation");
- var f = socialAction.makeElement("p", false, false, s, "Start chatting to Cleverbot. Your conversation will appear below.");
- $(f).hide();
- $(h).click(function()
- {
- $(this).siblings("p").show();
- socialAction.loadingLoop(500, function()
- {
- socialAction.startOrContinueConversation(0)
- })
- })
- }
- for (var t = 0; t < w.length; t++)
- {
- var n = socialAction.allconversations[w[t]];
- if (!n)
- {
- continue
- }
- if (!n.createddate)
- {
- continue
- }
- var A = "conversation conversation" + n.id;
- if (n.id == socialAction.conversationCurrentId)
- {
- A += " current"
- }
- var s = socialAction.makeElement("li", false, A, m);
- var d = socialAction.makeElement("form", false, false, s, false, "saveconversation");
- $(d).submit(function(D)
- {
- var v = $(this).children("input.editbutton");
- v.attr("value", "edit");
- v.removeClass("savebutton");
- var B = $(this).children("input.title");
- B.attr("readonly", "readonly");
- B.removeClass("editable");
- var C = B.attr("value") != B.val();
- B.attr("value", B.val());
- $(this).prop("stopsubmit", C ? 0 : 1);
- return C
- });
- socialAction.makeElement("input", false, false, d, false,
- {
- name: "id",
- type: "hidden",
- value: n.id
- });
- var h = socialAction.makeElement("input", false, "title", d, false,
- {
- name: "title",
- value: n.title ? socialAction.unicodeConvert(n.title) : "untitled",
- readonly: "readonly"
- });
- var p = socialAction.makeElement("input", false, "editbutton", d, false,
- {
- type: "button",
- value: "edit"
- });
- $(p).click(function()
- {
- var v = $(this).siblings("input.title");
- var B = v.prop("conversationid");
- if (!v.attr("readonly"))
- {
- if (B)
- {
- socialAction.allconversations[B].isedit = 0
- }
- v.parent().submit()
- }
- else
- {
- if (B)
- {
- socialAction.allconversations[B].isedit = 1
- }
- if (B && !socialAction.allconversations[B].isopen)
- {
- v.click()
- }
- $(this).addClass("savebutton");
- $(this).attr("value", "save");
- v.addClass("editable");
- v.removeAttr("readonly");
- v.focus()
- }
- });
- if (n.isedit)
- {
- $(p).click()
- }
- socialAction.makeElement("span", false, false, s, "Started " + socialAction.getFullDate(n.createddate, 1));
- if (socialAction.canAdminister())
- {
- socialAction.makeElement("span", false, false, s, "Conversation ID: " + n.id);
- socialAction.makeElement("span", false, false, s, "Session ID: " + n.sessionid);
- socialAction.makeElement("span", false, false, s, "AIS: " + n.ais)
- }
- var o = socialAction.makeElement("div", false, false, s);
- if (n.id != j && n.isopen)
- {
- $(o).show()
- }
- if (n.textshow)
- {
- var x = n.numlines > socialAction.conversationShowInteractions;
- if (x)
- {
- var g = socialAction.makeElement("span", false, false, o, "show whole conversation");
- $(g).click(function()
- {
- $(this).html($(this).html() == "show whole conversation" ? "hide early part" : "show whole conversation");
- $(this).siblings("table").find("tr.early").toggle(500)
- })
- }
- var f = socialAction.makeElement("table", "snipTextContainer" + n.id, false, o, n.textshow);
- if (socialAction.hassnips)
- {
- if (x)
- {
- socialAction.makeElement("div", "snipTextIconTop" + n.id, "snipTextIcon sniptop", f);
- snipAction.connectNewIcon("#snipTextIconTop" + n.id, "#snipTextContainer" + n.id + " > tbody > tr", true)
- }
- socialAction.makeElement("div", "snipTextIconBottom" + n.id, "snipTextIcon snipbottom", f);
- snipAction.connectNewIcon("#snipTextIconBottom" + n.id, "#snipTextContainer" + n.id + " > tbody > tr", true)
- }
- }
- $(h).prop("conversationid", n.id);
- $(h).click(function(v)
- {
- if (!$(this).attr("readonly"))
- {
- return
- }
- var B = $(this).prop("conversationid");
- var i = $(this).parent().siblings("div");
- socialAction.allconversations[B].isopen = socialAction.allconversations[B].isopen ? 0 : 1;
- if (i.children("table").html())
- {
- i.toggle(500, socialAction.resizeExtenders)
- }
- else
- {
- socialAction.socialCall("getconversation",
- {
- conversationid: B
- })
- }
- });
- var d = socialAction.makeElement("form", false, false, o, false, "saveconversation");
- socialAction.makeElement("input", false, false, d, false,
- {
- name: "id",
- type: "hidden",
- value: n.id
- });
- socialAction.makeElement("label", false, false, d, "Why are you here? ",
- {
- "for": "cbconversationtype"
- });
- var l = socialAction.makeElement("select", "cbconversationtype", false, d, socialAction.conversationTypes,
- {
- name: "conversationtype",
- value: n.conversationtype
- });
- $(l).change(function()
- {
- var i = $(this).siblings("input[type=text]");
- if ($(this).val() == "other")
- {
- i.show()
- }
- else
- {
- i.hide()
- }
- $(this).parent().submit()
- });
- var b = socialAction.makeElement("input", "cbconversationtypeother", false, d, null,
- {
- name: "conversationtypeother",
- type: "text",
- value: n.conversationtypeother
- });
- $(b).change(function()
- {
- $(this).parent().submit()
- });
- if ($(l).val() != "other")
- {
- $(b).hide()
- }
- socialAction.makeElement("br", false, false, d);
- socialAction.makeElement("label", false, false, d, "How human is Cleverbot? ",
- {
- "for": "cbconversationhuman"
- });
- var b = socialAction.makeElement("select", "cbconversationhuman", false, d, socialAction.conversationHowHuman,
- {
- name: "conversationhuman",
- value: n.conversationhuman,
- byindex: 1
- });
- $(b).change(function()
- {
- $(this).parent().submit()
- });
- socialAction.makeElement("br", false, false, d);
- socialAction.makeElement("label", false, false, d, "How satisfied are you? ",
- {
- "for": "cbconversationsatisfaction"
- });
- var b = socialAction.makeElement("select", "cbconversationsatisfaction", false, d, socialAction.conversationHowSatisfied,
- {
- name: "conversationsatisfaction",
- value: n.conversationsatisfaction,
- byindex: 1
- });
- $(b).change(function()
- {
- $(this).parent().submit()
- });
- var c = 0;
- for (var k = 1; k <= socialAction.voteLabels.length; k++)
- {
- c += n["vote" + k]
- }
- if (c > 0)
- {
- socialAction.makeElement("br", false, false, d);
- var e = socialAction.makeElement("span", false, false, d, "How you voted:");
- for (var k = 1; k <= socialAction.voteLabels.length; k++)
- {
- if (n["vote" + k] > 0)
- {
- socialAction.makeElement("span", false, "vote" + k, e, socialAction.voteLabels[k - 1] + " " + n["vote" + k])
- }
- }
- }
- var z = socialAction.makeElement("input", false, "continuebutton", d, false,
- {
- type: "button",
- value: "continue conversation"
- });
- $(z).click(new Function("socialAction.startOrContinueConversation(" + n.id + ");"));
- socialAction.addDeleteButtonToForm(d, "delete", "delete this conversation");
- socialAction.makeElement("div", false, "clear", d)
- }
- if (!w)
- {
- socialAction.makeElement("li", false, "nothingtoshow", m, "no previous conversations found")
- }
- if (j)
- {
- $("li.conversation" + j + " div").show(500, socialAction.resizeExtenders)
- }
- if (q)
- {
- socialAction.resizeExtenders()
- }
- },
- setVoteColourClass: function(b, e)
- {
- for (var c = 1; c <= b.length; c++)
- {
- var d = $(b[c - 1]);
- if (c <= e)
- {
- d.removeClass(d.prop("startclass"))
- }
- else
- {
- d.addClass(d.prop("startclass"))
- }
- }
- },
- addVotingButtons: function(h)
- {
- var f = "show10";
- if (socialAction.voteDistance == 1)
- {
- f = "show75"
- }
- else
- {
- if (socialAction.voteDistance == 2)
- {
- f = "show50"
- }
- else
- {
- if (socialAction.voteDistance == 3)
- {
- f = "show40"
- }
- else
- {
- if (socialAction.voteDistance == 4)
- {
- f = "show30"
- }
- else
- {
- if (socialAction.voteDistance == 5)
- {
- f = "show20"
- }
- }
- }
- }
- }
- var j = $(h);
- var l = socialAction.makeElement("div", "cbvoting");
- var d = socialAction.makeElement("div", false, false, l);
- $(d).mouseleave(function()
- {
- socialAction.setVoteColourClass($(this).children("div.colour"), 0);
- $(this).children("div.text").hide()
- });
- for (var g = 1; g <= socialAction.voteLabels.length; g++)
- {
- var k = socialAction.vote == g ? f : "show0";
- var e = socialAction.makeElement("div", false, "text text" + g, d, socialAction.voteLabels[g - 1]);
- var b = socialAction.makeElement("div", false, k + " colour colour" + g, d);
- var c = socialAction.makeElement("div", false, "circle circle" + g, d);
- $(b).prop("vote", g);
- $(b).prop("startclass", k);
- $(c).prop("vote", g);
- $(c).mouseenter(function()
- {
- var i = $(this).prop("vote");
- socialAction.setVoteColourClass($(this).siblings("div.colour").andSelf(), i);
- $(this).siblings("div.text").hide();
- $(this).siblings("div.text" + i).show()
- });
- $(c).click(function()
- {
- socialAction.vote = $(this).prop("vote");
- $(this).siblings("div.colour").prop("startclass", "show0");
- $(this).prev("div.colour").prop("startclass", "show100");
- socialAction.voteDistance = 0
- })
- }
- j.before(l)
- },
- loadingLoop: function(b, c)
- {
- $("#cbsocial .loading").show();
- setTimeout(function()
- {
- c();
- $("#cbsocial .loading").hide()
- }, b)
- },
- socialCall: function(d, g, f, h)
- {
- if (!f)
- {
- $("#cbsocial .loading").show()
- }
- $("#cbsocialmessage" + d).hide();
- var b = socialAction.jsonurl + "?";
- if (d)
- {
- b += "action=" + d + "&"
- }
- if (typeof g == "object")
- {
- for (var e in g)
- {
- b += e + "=" + encodeURIComponent(g[e]) + "&"
- }
- }
- if (!g.howmany)
- {
- b += "howmany=" + socialAction.loadEachTime + "&"
- }
- if (!h)
- {
- h = "processAction"
- }
- b += "callback=socialAction." + h;
- var c = document.createElement("script");
- if (socialAction.debugMode >= 1)
- {
- socialAction.debug("About to call " + b, null, 1)
- }
- c.setAttribute("action", "text/javascript");
- c.setAttribute("src", b);
- if (document.body)
- {
- document.body.appendChild(c)
- }
- else
- {
- if (document.head)
- {
- document.head.appendChild(c)
- }
- }
- },
- showObject: function(g, h, e)
- {
- if (!h)
- {
- h = 0
- }
- if (h > 5)
- {
- return ""
- }
- var d = "";
- var b = "";
- for (var c = 0; c < h; c++)
- {
- b += " "
- }
- for (var f in g)
- {
- if (typeof g[f] == "object")
- {
- d += f + ":\n" + socialAction.showObject(g[f], h + 1)
- }
- else
- {
- d += b + f + ": " + g[f] + "\n"
- }
- }
- if (e && h == 0)
- {
- alert(d)
- }
- return d
- }
- };
- var Base64 = {
- _keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
- encode: function(j)
- {
- var m = "";
- var d, b, g, p, c, l, k;
- var h = 0;
- j = Base64._utf8_encode(j);
- while (h < j.length)
- {
- d = j.charCodeAt(h++);
- b = j.charCodeAt(h++);
- g = j.charCodeAt(h++);
- p = d >> 2;
- c = (d & 3) << 4 | b >> 4;
- l = (b & 15) << 2 | g >> 6;
- k = g & 63;
- if (isNaN(b))
- {
- l = k = 64
- }
- else
- {
- if (isNaN(g))
- {
- k = 64
- }
- }
- m = m + this._keyStr.charAt(p) + this._keyStr.charAt(c) + this._keyStr.charAt(l) + this._keyStr.charAt(k)
- }
- return m
- },
- decode: function(j)
- {
- var m = "";
- var d, b, g;
- var p, c, l, k;
- var h = 0;
- j = j.replace(/[^A-Za-z0-9\+\/\=]/g, "");
- while (h < j.length)
- {
- p = this._keyStr.indexOf(j.charAt(h++));
- c = this._keyStr.indexOf(j.charAt(h++));
- l = this._keyStr.indexOf(j.charAt(h++));
- k = this._keyStr.indexOf(j.charAt(h++));
- d = p << 2 | c >> 4;
- b = (c & 15) << 4 | l >> 2;
- g = (l & 3) << 6 | k;
- m = m + String.fromCharCode(d);
- if (l != 64)
- {
- m = m + String.fromCharCode(b)
- }
- if (k != 64)
- {
- m = m + String.fromCharCode(g)
- }
- }
- m = Base64._utf8_decode(m);
- return m
- },
- _utf8_encode: function(d)
- {
- d = d.replace(/\r\n/g, "\n");
- var b = "";
- for (var f = 0; f < d.length; f++)
- {
- var c = d.charCodeAt(f);
- if (c < 128)
- {
- b += String.fromCharCode(c)
- }
- else
- {
- if (c > 127 && c < 2048)
- {
- b += String.fromCharCode(c >> 6 | 192);
- b += String.fromCharCode(c & 63 | 128)
- }
- else
- {
- b += String.fromCharCode(c >> 12 | 224);
- b += String.fromCharCode(c >> 6 & 63 | 128);
- b += String.fromCharCode(c & 63 | 128)
- }
- }
- }
- return b
- },
- _utf8_decode: function(d)
- {
- var b = "";
- var f = 0;
- var c = c1 = c2 = 0;
- while (f < d.length)
- {
- c = d.charCodeAt(f);
- if (c < 128)
- {
- b += String.fromCharCode(c);
- f++
- }
- else
- {
- if (c > 191 && c < 224)
- {
- c2 = d.charCodeAt(f + 1);
- b += String.fromCharCode((c & 31) << 6 | c2 & 63);
- f += 2
- }
- else
- {
- c2 = d.charCodeAt(f + 1);
- c3 = d.charCodeAt(f + 2);
- b += String.fromCharCode((c & 15) << 12 | (c2 & 63) << 6 | c3 & 63);
- f += 3
- }
- }
- }
- return b
- }
- };
- function upclick(e)
- {
- var f = {
- element: null,
- action: "about:blank",
- action_params:
- {},
- maxsize: 0,
- onstart: null,
- oncomplete: null,
- dataname: "Filedata",
- target: null,
- zindex: "auto"
- };
- for (var o in f)
- {
- e[o] = e[o] ? e[o] : f[o]
- }
- var h = e.element;
- if (typeof h == "string")
- {
- h = document.getElementById(h)
- }
- var n = h.ownerDocument;
- var m;
- var b = n.createElement("div");
- var l = "frame" + new Date().getTime().toString().substr(8);
- b.innerHTML = '<iframe name="' + l + '" src="about:blank" onload="this.onload_callback()"></iframe>';
- var c = b.childNodes[0];
- c.onload_callback = function()
- {
- var t = n.createElement("form");
- b.appendChild(t);
- t.method = "post";
- t.enctype = "multipart/form-data";
- t.encoding = "multipart/form-data";
- if (e.target)
- {
- t.target = e.target;
- t.setAttribute("target", e.target)
- }
- else
- {
- t.target = l;
- t.setAttribute("target", l)
- }
- t.action = e.action;
- t.setAttribute("action", e.action);
- t.style.margin = 0;
- t.style.padding = 0;
- t.style.height = "80px";
- t.style.width = "40px";
- t.runat = "server";
- var w = e.action_params;
- for (var s in w)
- {
- var v = n.createElement("input");
- v.type = "hidden";
- v.name = s;
- v.value = String(w[s]);
- t.appendChild(v)
- }
- if (e.maxsize)
- {
- var u = n.createElement("input");
- u.type = "hidden";
- u.name = "MAX_FILE_SIZE";
- u.value = String(e.maxsize);
- t.appendChild(u)
- }
- m = n.createElement("input");
- m.name = e.dataname;
- m.type = "file";
- m.size = "1";
- m.id = "fileInput";
- m.runat = "server";
- t.appendChild(m);
- m.style.position = "absolute";
- m.style.display = "block";
- m.style.top = 0;
- m.style.left = 0;
- m.style.height = t.style.height;
- m.style.width = "80px";
- m.style.opacity = 0;
- m.style.filter = "alpha(opacity=0)";
- m.style.fontSize = 8;
- m.style.zIndex = 1;
- m.style.visiblity = "hidden";
- m.style.marginLeft = "-40px";
- var q = function(z)
- {
- if (!m.value)
- {
- return
- }
- var x = e.onstart;
- if (x)
- {
- x(m.value)
- }
- if (this.files && this.files[0] && this.files[0].size > 0 && e.maxsize > 0 && this.files[0].size > e.maxsize && e.oncomplete)
- {
- e.oncomplete(
- {
- error: "file is too big, maximum is " + e.maxsize
- })
- }
- else
- {
- t.submit()
- }
- };
- if (m.addEventListener)
- {
- m.addEventListener("change", q, false)
- }
- else
- {
- if (m.attachEvent)
- {
- m.attachEvent("onpropertychange", function(x)
- {
- if (!x)
- {
- x = window.event
- }
- if (x.propertyName == "value")
- {
- q()
- }
- })
- }
- else
- {
- m.onpropertychange = q
- }
- }
- c.onload_callback = function()
- {
- var x = null;
- if (c.contentWindow)
- {
- x = c.contentWindow
- }
- else
- {
- if (c.contentDocument)
- {
- x = c.contentDocument.defaultView
- }
- }
- var A = "";
- var z = e.oncomplete;
- if (z)
- {
- z(A)
- }
- t.reset()
- }
- };
- c.style.display = "none";
- c.width = 0;
- c.height = 0;
- c.marginHeight = 0;
- c.marginWidth = 0;
- n.body.insertBefore(b, n.body.firstChild);
- b.style.position = "absolute";
- b.style.overflow = "hidden";
- b.style.padding = 0;
- b.style.margin = 0;
- b.style.visiblity = "hidden";
- b.style.width = "0px";
- b.style.height = "0px";
- if (e.zindex == "auto")
- {
- var p = 0,
- k;
- var g = h;
- var j;
- while (g.tagName != "BODY")
- {
- j = g.currentStyle ? g.currentStyle : getComputedStyle(g, null);
- k = parseInt(j.zIndex);
- k = isNaN(k) ? 0 : k;
- p += k + 1;
- g = g.parentNode
- }
- b.style.zIndex = p
- }
- else
- {
- b.style.zIndex = e.zindex
- }
- var d = function(s)
- {
- if (!s)
- {
- s = window.event
- }
- b.style.width = "0px";
- b.style.height = "0px";
- var q = n.elementFromPoint(s.clientX, s.clientY);
- if (q === h)
- {
- b.style.width = "40px";
- b.style.height = "80px"
- }
- };
- if (b.addEventListener)
- {
- b.addEventListener("mousemove", d, false)
- }
- else
- {
- if (b.attachEvent)
- {
- b.attachEvent("onmousemove", d)
- }
- }
- var i = function(s)
- {
- if (!s)
- {
- s = window.event
- }
- var q = y = 0;
- if (s.pageX)
- {
- q = s.pageX
- }
- else
- {
- if (s.clientX)
- {
- q = s.clientX + (n.documentElement.scrollLeft ? n.documentElement.scrollLeft : n.body.scrollLeft)
- }
- }
- if (s.pageY)
- {
- y = s.pageY
- }
- else
- {
- if (s.clientY)
- {
- y = s.clientY + (n.documentElement.scrollTop ? n.documentElement.scrollTop : n.body.scrollTop)
- }
- }
- b.style.left = q - 20 + "px";
- b.style.top = y - 40 + "px";
- b.style.width = "40px";
- b.style.height = "80px"
- };
- if (h.addEventListener)
- {
- h.addEventListener("mousemove", i, false)
- }
- else
- {
- if (h.attachEvent)
- {
- h.attachEvent("onmousemove", i)
- }
- }
- }
- if (typeof module == "object")
- {
- module.exports = {
- socialActionObject: socialAction,
- Base64Object: Base64
- }
- }
- else
- {
- if (typeof SOCIALINITDATA == "string")
- {
- socialAction.socialPreInit(SOCIALINITDATA)
- }
- else
- {
- socialAction.socialPreInit("")
- }
- };
Add Comment
Please, Sign In to add comment