‘}; }} For (i = 0; i 1) {var val = data [1] .replace (‘[', '') .replace (']‘, ”) .split (‘;’); if (val.length == 1) q = reb [i] .Style [1] .replace (‘{1}’, val [0]) replace (‘{2}’, ‘.’); else if (val.length & gt; 1) q = r and b [i] .Style [1] .replace (“{1}” Val [0]) replace (‘{2} “, val [1]).; Return}
Note: The original text and all editions will be visible to all users
‘;
}
handlelink function (obj, url) {
var t = [
{Type: 'youtube' exp 'youtube com / watch' append '& amp; autoplay = 1', width: 640, height: 385},
{Type: 'image', exp: '(.) (Jpg | jpeg | gif | png) $ ', width: 'auto', height: 'auto'}
];
for (var i = 0; i ‘);
$ (‘#user_html’) PrependTo ($ (‘#invisible_div’)).;
$ Ajax ({
url: ‘/stream/loadpage.html’
Date: {
id: contentid,
type: contenttype,
cp: p
}
dataType: ‘json’,
type: ‘post’,
success: function (a, b, c) {
if (a.result == 200) {
pager = $ (‘
‘) html (a.pager) .text. (); . $ (‘Span # comentarios_count’) html (a.total); . $ (‘.comment_pages’) Html (pager); // $ (‘#comments’) FadeOut (‘fast’, function () {h = $ (”) html (a.html) .text ();. H.replace h = (/ {2,} / gi, ”); h.replace h = (/
/ gi, ‘
r n’);
. $ (‘#comments’) Html (h); //.fadeIn(‘fast ‘, function () {
if (typeof post = ‘undefined’ & amp;! & amp; post) {
post = $ (‘#post_’ + post);
offset = (post.offset () top.) + ‘px’;
$ (‘Html, body’). Animate ({
scrollTop: offset
}, 600);
}
else {
offset = ($ (‘#comment_form’) offset () top..);
$ (‘Html, body’) scrollTop (offset).;
}
//});
//});
currentPage = pg;
}
else {
done (‘Error reading comments Try again later.’);
}
}
error: function (a, b) {
done (‘Error reading comments Try again later.’);
}
complete: function () {
}
});
}
function done (s) {
if (typeof (s) == ‘boolean’) {
.fancybox.close $ ();
return;
}
else if (typeof (s) == ‘string’)
$ (‘#done_text’) Html (‘
‘ + s + ‘
.’); else {t = ”; for (i = 0; i ‘+ s [i] +’
‘;} $ (‘ #done_text ‘) html (t),.} $ (‘ #done click ‘)’) trigger (. ‘ ;} function managesubscription (op, id) {$ ajax ({url: ‘/stream/assinar.html’, data: {id: id, remove: op == ‘un’ 1: 0}, type: ‘? post ‘, dataType:’ json ‘, success: function (a, b, c) {if (a.result == 200) {if (op ==’ un ‘) {$ (‘ #subscribe ‘) removeClass (. .. ‘on’) addClass (‘off’) attr (‘title’, ‘. Signature removed Click to sign again’);} else {$ (‘#subscribe’) removeClass (‘off’) addClass (‘.. on ‘) attr (.’ title ‘,’ Notifications of new messages will be sent to your e-mail Click to remove the signature. ‘);}}}, error: function (a, b) {alert (‘ Error removing signature .. try again later ‘);}, complete: function () {}});} function vote (d, id) {if (loggedIn) {$ (!’ #login click ‘);’) trigger (. ‘ return;} $ ajax ({url: ‘/stream/vote.html’, data: {id: id, d: d}, type: ‘post’, dataType: ‘json’, success: function (a, b , c) {$ (‘#voteup_’ + a.id) .find (‘span’) text (a.voteup).; $ (‘#votedown_’ + A.id) .find (‘span’) text (a.votedown).; if (a.result == 302) done (‘You have already voted for this post’); else if (a.result == 304) done (‘You can not vote for their own posts’); }, Error: function (a, b) {}, complete: function () {}}); Report} function (id) {if (! LoggedIn) {alert (‘You must be logged in to report posts’); . $ (‘#login’) Trigger (‘click’); return; Reason} = $ (‘input [name = "reason"]: checked’,
. $ (“#bbcode_container”) Prepend (text);
$ (“#bbcode_bb_bar The img”) css (“border”, “none.”);
var id = ‘#’ + $ (this) .attr (“id”);
var e = $ (id) .get (0);
$ (‘.editor_smilie.’) Live (‘click’, function (ev) {
ev.preventDefault ();
start = $ (this) .attr (‘rel’);
end = ”;
insert (start, end, e);
$ (‘.smilies_close’). Hide ();
$ (‘#smilies_container’) SlideUp (‘fast’).;
return false;
});
$ (‘#bbcode_bb_bar A’). Click (function (event) {
event.preventDefault ();
button_id var = $ (this) .attr (“id”);
if (button_id == ‘smilies’) {
if ($ (‘#smilies_container’) is (. ‘: visible’)) {
$ (‘.smilies_close’). Hide ();
$ (‘#smilies_container’) SlideUp (‘fast’).;
}
else {
$ (‘#smilies_container’). SlideDown (‘fast’, function () {
$ (‘.smilies_close’) Show ().;
});
}
return;
}
var start = ‘[' + button_id + ']‘;
var end = ‘[/' + button_id + ']‘;
var param = “”;
if (button_id == ‘img’)
{
param = prompt (“Enter image URL”, “http: //”);
if (param)
start + = param;
}
else if (button_id == ‘url’)
{
param = prompt (“Enter URL”, “http: //”);
if (param)
start = ‘[url href = “”0″) {
//element.focus ();
var startPos = element.selectionStart;
var = endPos element.selectionEnd;
element.value element.value.substring = (0, startPos) + start + element.value.substring (startPos, endPos) + end + element.value.substring (endPos, element.value.length);
element.selectionStart = startPos;
element.selectionEnd endPos + = + start.length end.length;
} Else {
element.value = + start + end;
}
. $ (‘.comment_text’) Trigger (‘keyup’);
}
// Hotkeys
/ *
$ (Document) .keyup (function (e)
{If (e.which == 17) isCtrl = false; }). Keydown (function (e)
{If (e.which == 17) isCtrl = true;
if (e.which == 66 & amp; & amp; isCtrl == true) // CTRL + B Bold
{
$ (“#b”) Click ().;
return false;
}
else if (e.which == 73 & amp; & amp; isCtrl == true) // CTRL + I, italic
{
$ (“#i”) Click ().;
return false;
}
else if (e.which == 85 & amp; & amp; isCtrl == true) // CTRL + U, underline
{
$ (“#U”) Click ().;
return false;
}
});
* /
}) (JQuery);


No comments:
Post a Comment