New here? Create an account
 
 Log in automatically

Kết quả cho từ khoá ""

Hangouts

Rise of the Argonauts

Inspired by G+ | Legion of Damned

Back to Top

  • Please feel free to contact us if you have any question.
    Thank you for your time!
  • Your donation will help us maintain this site

You are not connected. Please login or register

View previous topicPrevious | NextView next topicReply to topic

Go down Message [Page 1 of 1]

1 default TONIGHT WE FEAST on Tue Nov 01, 2016 4:16 pm

avatar

Admin
avatar

Admin

Cover Image :  gcover_photo

Posts :  3

Coins :  2147485188

Reputation :  10


Character
Nation: Alethius Alethius
Level:
1/99  (1/99)


Founder

Founder
console.log('//-----Written by Chalo ------- Open Source 2014-2016 -----//');
console.log('//------------ http://www.opensourcephpbb3.com ------------//');
console.log('//--------------------- Version: 1.4 ----------------------//');
console.log('//Reply, preview, quote, delete and more, without reload  //');
var os = {
   config: {
       reply: 1,
       edit: 1,
       quote: 1,
       delete: 1,
       preview: 1,
       beroreunload: 1,
       placeholder: 1,
       letters: 5,
       time: 3000,
       speed: 400,       
   },
   lang: {
       success_reply: 'Your message has been entered successfully',
       flood: 'Flood control is active on this forum, please wait 10 second(s) before replying or posting',
       newpost: 'A new message has been posted',
       error_reply: 'Try again',
       reply_words: 'You must write ',
       reply_btn_send: 'Send data...',
       notice_default: 'No predefined text',
       no_message: 'There is nothing written in the editor',
       no_subject: 'You must specify a subject for your message.',
       pm_error_a: 'You must specify a username to whom to send this message.',
       pm_error_b: 'This or these user(s) do not exist',
       pm_error_c: 'You cannot make another post so soon after your last',
       pm_success: 'Your message has been sent',
       placeholder: 'write something here...',
       edit_subject_placeholder: 'The length of the title for this topic must be ranging between 10 and 255 characters',
       delete_main: 'Do you want delete the post #',
       delete_yes: 'Delete',
       delete_cancel: 'Cancel',
       edit_mode: 'Editing post #',
       quote_mode: 'Quoting post #',
       loading: 'Loading...',
       save: 'Save',
       notice_wait: 'Please be patient, sending data to the server'
   },
Code:

    previewHTML: '<div id="preview_content"><a id="close" style="float:right;cursor:pointer;" onclick="os.close(\'preview\')"><img src="http://illiweb.com/fa/prosilver/icon_post_delete.gif"></a></div>',
    delete_style: '#confirm_content { color: #fff; margin-bottom: 7px; padding-bottom: 5px; font-size: 30px}#confirm >a { display: inline-block; padding: 4px 12px; margin-bottom: 0; font-size: 12px; line-height: 20px; color: #333; text-align: center; text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); vertical-align: middle; cursor: pointer; text-decoration: none!important;}#yes { color: #fff!important; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #5bb75b; background-image: linear-gradient(to bottom, #62c462, #51a351)!important; background-repeat: repeat-x; border-color: #51a351 #51a351 #387038; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25)!important;}#cancel { margin-left: 5px; color: #fff!important; background: linear-gradient(to bottom, #db5530 5%, #db1f1f 100%)!important; background-color: #db5530; text-shadow: 0 1px 0 #854629;}',
    init: function () {
        os.isTheme = /\/t\d+/g.test(window.location.pathname), os.isPost = /\/post\?f=(\d+)&mode=(newtopic)/.test(window.location.href), os.isEditPost = /\/post\?p=(\d+)&mode=(editpost)/.test(window.location.href), os.isMP = /\/privmsg\?mode=(post|reply|edit)/.test(window.location.href), os.phpbb2 = os.getEl('.bodylinewidth').length, os.phpbb3 = os.getEl('#phpbb'), os.invision = os.getEl('#ipbwrapper'), os.punbb = os.getEl('#pun-intro'), os.subject = os.isTheme && os.getEl('h1')[0].textContent, os.body = os.getEl('body'), os.form = os.getEl('forms').post, os.b_r = os.form.post, os.b_r_v = os.form.post.value, os.textarea = os.form.message, os.action = os.form.action, os.group = os.getEl('.sceditor-group')[0], os.b_p = os.form.preview, os.b_p_v = os.b_p.value, os.url = os.isTheme ? '/post?t=' + os.form.t.value + '&mode=reply' : os.isPost && document.location.href, os.sceditor = $(os.textarea).sceditor('instance'), os.content = os.punbb ? '.entry-content' : os.phpbb3 ? '.content' : os.invision ? '.post-entry' : os.phpbb2 && '.postbody', os.a = os.getEl('a'), 1 == os.config.placeholder && (os.getEl('.sceditor-grip', os.form)[0].previousElementSibling.placeholder = os.lang.placeholder), os.buttons(os.a), os.beforeunload()
    },
    buttons: function (e) {
        var o, s = 'os.get(this, \'quote\');return false',
            t = 'os.set_delete(this);return false',
            n = 'os.get(this,\'edit\');return false',
            r = 'os.post(this, \'preview\');return false',
            l = os.isMP ? 'os.post(this, \'mp\');return false' : 'os.post(this, \'reply\');return false';
        for (o = 0; o < e.length; o++) 1 == os.config.quote && /(?!\&(mode)\=)(quote)/.test(e[o].href) && e[o].setAttribute('onclick', s), 1 == os.config.delete && /(?!\&(mode)\=)(delete)/.test(e[o].href) && e[o].setAttribute('onclick', t), 1 == os.config.edit && /(?!\&(mode)\=)(edit)/.test(e[o].href) && e[o].setAttribute('onclick', n);
        1 == os.config.preview && os.b_p.setAttribute('onclick', r), 1 == os.config.reply && os.b_r.setAttribute('onclick', l)
    },
    get: function (e, o) {
        os.url_universal = 'undefined' != typeof e.href ? e.href : e;
        var s, t, n, r, l, i, a, c, d, p = os.url_universal.match(/(?!\/post\?p=(\w+)\&mode=)(editpost|quote)|viewtopic/)[0],
            f = os.post_number(os.url_universal);
        os.XML('', os.url_universal, function (u) {
            switch (d = u.responseXML, p) {
            case 'editpost':
                os.sceditor.updateOriginal(), s = d.forms.post.message.value, i = os.getEl('.post--' + f), t = os.cr_el('input'), t.className = 'inputbox medium edit_subject', t.placeholder = os.lang.edit_subject_placeholder, t.name = 'subject', t.style = 'display:table;margin:0 auto;width: 99%;margin-bottom: 5px', t.value = d.forms.post.subject.value, !os.getEl('.edit_subject').length && os.group.parentNode.insertBefore(t, os.group), os.edit_subject = os.getEl('.edit_subject')[0], i.length && (i[0].style.border = '1px solid orange!important'), os.sceditor.val(s), os.b_r.setAttribute('onclick', 'os.post(this, \'edit\');return false'), os.encode_edit = os.serialize(d.forms.post), os.url_edit = e.href, os.edit_number = f, os.b_r.value = os.lang.save, os.notice(os.lang.edit_mode + f, os.config.color_b, 'false'), os.scroll(os.form, os.config.speed);
                break;
            case 'quote':
                os.sceditor.updateOriginal(), os.scroll(os.form, os.config.speed), s = d.forms.post.message.value, n = os.sceditor.val(), os.sceditor.val(n + s), os.notice(os.lang.quote_mode + f, os.config.color_a, 'false');
                break;
            case 'viewtopic':
                l = os.getEl('.post--' + f, d)[0], l.style.display = 'none', l.className += ' new_ajax_post', r = os.getEl('.post--' + f)[0], 'reply' == o && (os.buttons(os.getEl('a', l)), os.set_post(l)), 'edit' == o && (a = os.getEl(os.content, l), c = a[0].innerHTML, os.getEl(os.content, r)[0].innerHTML = c, os.b_r.setAttribute('onclick', 'os.post(this, \'reply\');return false'), os.fadeIn(r, 500), os.scroll(r, os.config.speed)), os.sceditor.val(''), os.notice(os.lang.success_reply, os.config.color_e, 'true')
            }
        })
    },
    post: function (e, o) {
        var s, t, n, r, l, i, a, c, d, p, f, u, g, j, m, b, v, y, h, v;
        os.sceditor.updateOriginal(), clearInterval(s), d = 'edit' == o && encodeURIComponent(os.sceditor.val()), y = 'edit' == o && encodeURIComponent(os.edit_subject.value), os.url_post = 'delete' == o ? e.href : os.form.action, os.uritexto = 'reply' == o || 'mp' == o ? os.serialize(os.form) + '&post=1&prevent_post=1' : 'preview' == o ? os.serialize(os.form) + '&preview=Preview' : 'delete' == o ? '&confirm=1' : '&subject=' + y + '&message=' + d + '&mode=editpost&p=' + os.edit_number + '¬ify=on&&post=1&prevent_post=1', a = os.getEl('.new_ajax_post'), a.length && a[0].classList.remove('new_ajax_post'), h = os.sceditor.val(), h.match(/\w{2,}\b/g) != null && h.match(/\w{2,}\b/g).length >= os.config.letters || 'delete' == o ? (os.isPost || os.isMP) && os.form.subject && os.form.subject.value.length >= 10 || 'preview' == o || os.isEditPost || os.isTheme ? ('delete' != o && (e.value = 'preview' == o ? os.lang.loading : os.lang.reply_btn_send, 'preview' == o ? os.b_p.style = 'color:#fff;background:' + os.config.color_d : os.b_r.style = 'color:#fff;background:' + os.config.color_d), os.XML(os.uritexto, os.url_post, function (e) {
            l = e.responseXML, i = os.getEl(os.phpbb2 ? '#page-body' : '#main', l), p = os.getEl('.postbody', l)[0], s = i.innerHTML.indexOf(os.lang.success_reply), t = i.innerHTML.indexOf(os.lang.flood), c = i.innerHTML.indexOf(os.lang.newpost), j = i.innerHTML.indexOf(os.lang.pm_error_b), m = i.innerHTML.indexOf(os.lang.pm_error_c), b = i.innerHTML.indexOf(os.lang.pm_success), v = i.innerHTML.indexOf(os.lang.pm_error_a), /mp/.test(o) ? v > 0 ? (os.notice(os.lang.pm_error_a, os.config.color_c, 'true'), os.refresh(os.b_r, os.b_r_v)) : j > 0 ? (os.notice(os.lang.pm_error_b, os.config.color_c, 'true'), os.refresh(os.b_r, os.b_r_v)) : m > 0 ? (os.notice(os.lang.pm_error_c, os.config.color_c, 'true'), os.refresh(os.b_r, os.b_r_v)) : b > 0 && (os.sceditor.val(''), os.refresh(os.b_r, os.b_r_v), setTimeout(function () {
                document.location.href = '/privmsg?folder=inbox'
            }, 2e3)) : /(reply|edit)/.test(o) ? (os.viewtopic(l), n = os.view_url, os.b_r.style = 'color:#fff;background:' + os.config.color_d, t > 0 ? (os.notice(os.lang.flood, os.config.color_b, 'true'), os.refresh(os.b_r, os.b_r_v)) : c > 0 ? (os.notice(os.lang.newpost, os.config.color_b, 'true'), os.refresh(os.b_r, os.b_r_v)) : 0 > s ? (os.notice(os.lang.error_reply, '', 'true'), os.refresh(os.b_r, os.b_r_v)) : os.isTheme ? ('undefined' != typeof n && os.get(n, o), 'edit' == o && os.edit_subject.remove(), os.notice(os.lang.notice_wait, os.config.color_c, 'true'), os.refresh(os.b_r, os.b_r_v)) : (os.overlay(os.lang.loading), os.sceditor.val(''), setTimeout(function () {
                document.location.href = n
            }, 2e3), os.refresh(os.b_r, os.b_r_v))) : /preview/.test(o) ? (os.create_preview(), f = os.getEl('#preview_content'), f.appendChild(p), os.fadeIn(p, 500), os.b_p.value = os.b_p_v, os.b_p.style = '') : /delete/.test(o) && (r = os.getEl('.post--' + os.post_number(os.url_post)), g = os.getEl('#confirm_wrap'), u = os.getEl('#overlay'), r.length && (os.phpbb2 ? (os.fadeOut(r[0].nextElementSibling, 500), os.fadeOut(r[0], 500)) : os.fadeOut(r[0], 500)), g && g.remove(), u && u.remove())
        })) : (os.notice(os.lang.no_subject, os.config.color_d, 'true'), os.refresh(os.b_r, os.b_r_v), os.b_r.style = '') : (v = h.length > 0 && h.match(/\w{2,}\b/g) != null ? os.config.letters - h.match(/\w{2,}\b/g).length : 5, os.notice(os.lang.reply_words + v + ' word' + (v > 1 ? 's' : ''), os.config.color_d, 'true'), 'reply' == o ? os.refresh(os.b_r, os.b_r_v) : os.refresh(os.b_p, os.b_p_v))
    },
    refresh: function (e, o) {
        e.value = o, e.style = ''
    },
    overlay: function (e) {
        var o = os.cr_el('div');
        o.style = 'font-family:arial;display:block;position:fixed;top:0;left:0;min-height:101%;width:100%;background-color:rgba(0, 0, 0, .4);z-index:999;color:#fff;font-size: 45px; text-align: center; line-height: 13', o.id = 'overlay', 'undefined' != typeof e && (o.textContent = e), os.body.appendChild(o)
    },
    create_preview: function () {
        var e = os.cr_el('div');
        e.style = 'background:#fff;left:15%;position:fixed;top:10%;width:70%;height:65%;overflow:auto;z-index:999;box-shadow:10px 10px 40px black;border-radius:3px;font-size:1.2em;padding:10px;font-family:Arial;text-shadow:0 1px 1px white;color:#666;', e.id = 'preview_content', e.innerHTML = os.previewHTML, os.overlay(), os.body.appendChild(e)
    },
    set_delete: function (e) {
        var o, s, t;
        s = os.cr_el('div'), t = os.cr_el('style'), s.innerHTML = '<div id="confirm_content">' + os.lang.delete_main + os.post_number(e.href) + '?</div><div id="confirm"><a id="yes" class="yes" href="' + e.href + '" onclick="os.post(this,\'delete\');return false">' + os.lang.delete_yes + '</a><a id="cancel" onclick="os.close(\'delete\')">' + os.lang.delete_cancel + '</a></div>', s.id = 'confirm_wrap', s.style = 'font-family:arial;display: inline-block; vertical-align: top; width: auto; text-align: center; z-index: 9999; padding: 7px 13px; position: fixed; top: 35%; left: 30%', os.overlay(), os.body.appendChild(s), t.innerHTML = os.delete_style, t.type = 'text/css', t.id = 'd_style', !os.getEl('#d_style') && os.getEl('head').appendChild(t), o = os.getEl('#yes')
    },
    set_post: function (e) {
        var o = os.punbb ? os.getEl('.topic')[0] : os.phpbb2 ? os.getEl('.catBottom')[0].parentNode.previousElementSibling : os.phpbb3 ? os.getEl('*bottomtitle')[0].previousElementSibling : os.invision && os.getEl('.topic-footer')[0].previousElementSibling;
        os.punbb ? o.appendChild(e) : o.parentNode.insertBefore(e, o.nextSibling), os.scroll(e, os.config.speed), os.fadeIn(e, 500)
    },
    XML: function (e, o, s) {
        var t;
        t = window.XMLHttpRequest ? new XMLHttpRequest : window.ActiveXObject && new ActiveXObject('Microsoft.XMLHTTP'), 'undefined' != typeof e ? t.open('POST', o) : t.open('GET', o, !0), t.responseType = 'document', t.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'), t.send('undefined' != typeof e ? e : ''), t.onreadystatechange = function () {
            4 == this.readyState && 200 == this.status && s(this)
        }
    },
    serialize: function (e) {
        var o, s, t, n, r = [];
        if ('object' == typeof e && 'FORM' == e.nodeName)
            for (n = e.elements.length, s = 0; n > s; s++)
                if (o = e.elements[s], o.name && !o.disabled && 'file' != o.type && 'reset' != o.type && 'submit' != o.type && 'button' != o.type)
                    if ('select-multiple' == o.type)
                        for (t = e.elements[s].options.length - 1; t >= 0; t--) o.options[t].selected && (r[r.length] = encodeURIComponent(o.name) + '=' + encodeURIComponent(o.options[t].value));
                    else('checkbox' != o.type && 'radio' != o.type || o.checked) && (r[r.length] = encodeURIComponent(o.name) + '=' + encodeURIComponent(o.value));
        return r.join('&').replace(/%20/g, '+')
    },
    notice: function (e, o, s) {
        var t, n, r, l, i;
        i = os.getEl('.notice_reply'), n = os.group, r = n.parentNode, t = i.length ? i[0] : os.cr_el('DIV'), l = 'height:20px;line-height: 1.5;border-radius: 3px; text-shadow: 0 1px rgba(255, 255, 255, 0.46);text-align:center', !i.length && (t.classList.add('notice_reply'), t.setAttribute('style', l), r.insertBefore(t, n)), t.style.display = 'block', t.innerHTML = 'undefined' == typeof e ? os.lang.notice_default : e, t.style.background = 'undefined' == typeof o || '' == o ? os.config.color_a : o, 'false' != s && setTimeout(function () {
            'block' == t.style.display && (t.style.display = 'none')
        }, os.config.time)
    },
    fadeIn: function (e, o) {
        var s, t;
        e && (e.style.opacity = 0, e.style.filter = 'alpha(opacity=0)', e.style.display = '', e.style.visibility = 'visible', o ? (s = 0, t = setInterval(function () {
            s += 50 / o, s >= 1 && (clearInterval(t), s = 1), e.style.opacity = s, e.style.filter = 'alpha(opacity=' + 100 * s + ')'
        }, 50)) : (e.style.opacity = 1, e.style.filter = 'alpha(opacity=1)'))
    },
    fadeOut: function (e, o) {
        if (e)
            if (o) var s = 1,
                t = setInterval(function () {
                    s -= 50 / o, s > 0 || (clearInterval(t), s = 0, e.style.display = 'none', e.style.visibility = 'hidden'), e.style.opacity = s, e.style.filter = 'alpha(opacity=' + 100 * s + ')'
                }, 50);
            else e.style.opacity = 0, e.style.filter = 'alpha(opacity=0)', e.style.display = 'none', e.style.visibility = 'hidden'
    },
    close: function (e) {
        var o = os.getEl('delete' == e ? '#confirm_wrap' : '#preview_content'),
            s = os.getEl('#overlay');
        o.remove(), s.remove()
    },
    scroll: function (e, o, s, t) {
        o = o || 500, t = t || window;
        var n = t.scrollTop || window.pageYOffset;
        if ('number' == typeof e) var r = parseInt(e);
        else var r = os.getTop(e, n);
        var l = Date.now(),
            i = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || function (e) {
                window.setTimeout(e, 15)
            },
            a = function () {
                var c = Date.now() - l;
                t !== window ? t.scrollTop = os.position(n, r, c, o) : window.scroll(0, os.position(n, r, c, o)), c > o ? 'function' == typeof s && s(e) : i(a)
            };
        a()
    },
    beforeunload: function () {
        var e = os.sceditor;
        e && (window.onbeforeunload = function () {
            return e.val().length ? 'ok' : void 0
        })
    },
    easeInOutCubic: function (e) {
        return .5 > e ? 4 * e * e * e : (e - 1) * (2 * e - 2) * (2 * e - 2) + 1
    },
    position: function (e, o, s, t) {
        return s > t ? o : e + (o - e) * os.easeInOutCubic(s / t)
    },
    getTop: function (e, o) {
        return 'HTML' === e.nodeName ? -o : e.getBoundingClientRect().top + o
    },
    viewtopic: function (e) {
        var o, s = os.getEl('a', e);
        for (o = 0; o < s.length; o++) /\/viewtopic/g.test(s[o].href) && (os.view_url = s[o].href)
    },
    post_number: function (e) {
        return e.match(/viewtopic/) ? e.match(/(\w+)$/g)[0] : e.match(/[\p\=](\w+)(?=\&)/)[1]
    },
    cr_el: function (e, o) {
        var s = document.createElement(e);
        if (o) {
            for (var t in o) 'style' != t && (s[t] = o[t]);
            o.style && this.style(s, o.style)
        }
        return s
    },
    getEl: function (e, o) { switch (o = 'undefined' != typeof o ? o : document, e.charAt(0).match(/\W/) ? e.charAt(0) : e) { case '#': return o.getElementById(e.substr(1)); case '.': return o.getElementsByClassName(e.substr(1)); case '*': return o.getElementsByName(e.substr(1)); case 'body': return o.body; case 'head': return o.head; case 'forms': return o.forms; default: return o.getElementsByTagName(e)
      }
  }
};
$(function () {
    $(function () {
        (document.getElementById('logout') && /\/t\d+/g.test(window.location.pathname) || /\/post/.test(window.location.pathname) || /\/privmsg\?mode=(post|reply|edit)/.test(window.location.href)) && os.init()
    })
});
 
[gallery][/gallery]



Last edited by Admin on Mon Nov 28, 2016 10:06 pm; edited 6 times in total

2 default Re: TONIGHT WE FEAST on Tue Nov 01, 2016 5:21 pm

avatar

Admin
avatar

Admin

Cover Image :  gcover_photo

Posts :  3

Coins :  2147485188

Reputation :  10


Character
Nation: Alethius Alethius
Level:
1/99  (1/99)


Founder

Founder
wwwwwwwwwwwwwwwwwwwwwwwww eeeeeeeeeeee ew ewewewe we w eweweewe w e

3 default Re: TONIGHT WE FEAST on Tue Nov 01, 2016 5:21 pm

avatar

Admin
avatar

Admin

Cover Image :  gcover_photo

Posts :  3

Coins :  2147485188

Reputation :  10


Character
Nation: Alethius Alethius
Level:
1/99  (1/99)


Founder

Founder
wwwwwwwwwwwwwwwwwwwwwwwww eeeeeeeeeeee ew ewewewe we w eweweewe w e

4 default Re: TONIGHT WE FEAST on Tue Nov 01, 2016 5:21 pm

avatar

Admin
avatar

Admin

Cover Image :  gcover_photo

Posts :  3

Coins :  2147485188

Reputation :  10


Character
Nation: Alethius Alethius
Level:
1/99  (1/99)


Founder

Founder
wwwwwwwwwwwwwwwwwwwwwwwww eeeeeeeeeeee ew ewewewe we w eweweewe w e

5 default Re: TONIGHT WE FEAST on Tue Nov 01, 2016 5:23 pm

avatar

Admin
avatar

Admin

Cover Image :  gcover_photo

Posts :  3

Coins :  2147485188

Reputation :  10


Character
Nation: Alethius Alethius
Level:
1/99  (1/99)


Founder

Founder
wwwwwwwwwwwwwwwwwwwwwwwww eeeeeeeeeeee ew ewewewe we w eweweewe w e

6 default Re: TONIGHT WE FEAST

Sponsored content

Sponsored content


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