UNPKG

bubcloud

Version:

A responsive theme for Forumotion

14 lines 4.4 kB
/*! * bubcloud - v1.0.7 * A responsive theme for Forumotion * http://devs.forumvi.com * * Made by Zzbaivong <Zzbaivong@gmail.com> (http://baivong.github.io) * Under MIT License */ function bodau(e){return e=e.toLowerCase(),e=e.replace(/\u00e0|\u00e1|\u1ea1|\u1ea3|\u00e3|\u00e2|\u1ea7|\u1ea5|\u1ead|\u1ea9|\u1eab|\u0103|\u1eb1|\u1eaf|\u1eb7|\u1eb3|\u1eb5/g,"a"),e=e.replace(/\u00e8|\u00e9|\u1eb9|\u1ebb|\u1ebd|\u00ea|\u1ec1|\u1ebf|\u1ec7|\u1ec3|\u1ec5/g,"e"),e=e.replace(/\u00ec|\u00ed|\u1ecb|\u1ec9|\u0129/g,"i"),e=e.replace(/\u00f2|\u00f3|\u1ecd|\u1ecf|\u00f5|\u00f4|\u1ed3|\u1ed1|\u1ed9|\u1ed5|\u1ed7|\u01a1|\u1edd|\u1edb|\u1ee3|\u1edf|\u1ee1/g,"o"),e=e.replace(/\u00f9|\u00fa|\u1ee5|\u1ee7|\u0169|\u01b0|\u1eeb|\u1ee9|\u1ef1|\u1eed|\u1eef/g,"u"),e=e.replace(/\u1ef3|\u00fd|\u1ef5|\u1ef7|\u1ef9/g,"y"),e=e.replace(/\u0111/g,"d"),e=e.replace(/\W+/g,"-"),e=e.replace(/-{2}/g,"-"),e=e.replace(/^-+|-+$/g,"")} window.removeEventListener("message",onMessage,!0),window.addEventListener("message",function(e){if("servimg"===e.data.from){var t=e.data.data.match(/\[img\](.+)?\[\/img\]/g),a="";"array"===$.type(t)&&(1===t.length?a=t[0]+"\n":$.each(t,function(e,t){a+=t+"\n"}),$("#text_editor_textarea").sceditor("instance").insert(a+"\n"))}},!0); function debounce(n,t,u){var e;return function(){var i=this,o=arguments,a=u&&!e;clearTimeout(e),e=setTimeout(function(){e=null,u||n.apply(i,o)},t),a&&n.apply(i,o)}} !function(n){"use strict";function e(e){var i=n(e);i.attr("value",i.val())}var i=navigator.userAgent.toLowerCase();n.browser={version:parseInt(navigator.appVersion),msie:-1!==i.indexOf("msie")&&-1===i.indexOf("opera"),opera:-1!==i.indexOf("opera"),mozilla:-1!==i.indexOf("mozilla"),safari:-1!==i.indexOf("safari")},n.fn.jqDrag=n.fn.bgiframe=function(){return n.noop()};n(function(){0===location.pathname.indexOf("/u")&&1===_userdata.session_logged_in&&n(".field_editable").on("input",[".post",".inputbox"][1],function(){e(this)}).on("change","select",function(){e(this)}).find("select, input, textarea").each(function(){e(this)})})}(jQuery); function gotoTop(o){$("html, body").animate({scrollTop:o?o.offset().top:0})} function themeChoose(o,e,a){$("#bubcloud").text("a:focus,a:hover{color:#"+o+'}#new-message-link a:focus,#new-message-link a:hover,.btn:focus,.btn:hover,.button:focus,.button:hover,.privmsg-footer a:focus,.privmsg-footer a:hover,.privmsg-options a:focus,.privmsg-options a:hover,.zzPoll h3>a:focus,.zzPoll h3>a:hover,[type=button]:focus,[type=button]:hover,[type=submit]:focus,[type=submit]:hover,a[href="javascript:window.close();"]:focus,a[href="javascript:window.close();"]:hover,#header,.pagination a:active{background-color:#'+o+"!important}.borderwrap .maintitle h1 a:focus,.borderwrap .maintitle h1 a:hover,.borderwrap .maintitle h2 a:focus,.borderwrap .maintitle h2 a:hover,.borderwrap .maintitle h3 a:focus,.borderwrap .maintitle h3 a:hover{color:#"+o+"!important}@media only screen and (min-width:768px){.current-user-link a:focus strong,.current-user-link a:hover strong{color:#"+o+'!important}}#new-message-link a,.btn,.button,.privmsg-footer a,.privmsg-options a,.zzPoll h3>a,[type=button],[type=submit],a[href="javascript:window.close();"],.pagination a:focus,.pagination a:hover,.pagination b,.poll-width{background-color:#'+e+"}.borderwrap .maintitle h1 a,.borderwrap .maintitle h2 a,.borderwrap .maintitle h3 a{color:#"+e+"!important}.post-header{background:#"+e+"}#new-message .privmsg li .tabitem,.privmsg-menu li .tabitem,#new-message .privmsg li .tabitem a:focus,#new-message .privmsg li .tabitem a:hover,.privmsg-menu li .tabitem a:focus,.privmsg-menu li .tabitem a:hover,.post-type-icons input:checked+span,.post-type-icons span:hover{border-color:#"+e+"}#navstrip{border-left-color:#"+e+"}a,.poll-label:hover,.poll-vote:checked+.poll-label{color:#"+e+"}@media only screen and (min-width:768px){.current-user-link a strong{color:#"+e+"!important}}.post-header,.post-header a,#site-desc{color:#"+a+"}#profile-advanced-details .avatar,.author-avatar,.current-avatar,.friend-block .avatar,.lastpost-avatar,.member-avatar{background:#"+a+"}")}var themeCookie=my_getcookie("bubcloud");""!==themeCookie&&null!==themeCookie&&(themeChoose((themeCookie=themeCookie.split("|"))[0],themeCookie[1],themeCookie[2]),$(function(){$(".color-button").css("color","#"+themeCookie[0]),$('.color-choose[data-colorX="'+themeCookie[0]+'"]').addClass("active")}));