Widgets no fórum

Ver o tópico anterior Ver o tópico seguinte Ir em baixo

Atendido / Resolvido Widgets no fórum

Mensagem por Ketholy em 20.12.18 13:29

Detalhes da questão


Endereço do fórum: https://assuntosgeral-com-br.forumeiros.com/forum
Versão do fórum: phpBB3

Descrição


Olá,

Gostaria de colocar os Widgets do fórum visivel e não anexados, não sei como coloca já que a versão do fórum que uso não tem a opção.

Exemplo estão desse jeito:

Widgets no fórum Screen14

Quero que eles fiquem onde a seta esta apontando sem ser anexados dentro da imagem imagem acima.

Widgets no fórum Screen15
Ketholy

Ketholy
Membro do Fórum

Feminino
Inscrito dia : 20/01/2017
Mensagens : 1297
Pontos Ativos : 1558

Ver perfil do usuário http://jogosrpg-com-br.forumais.com/forum http://assuntosgeral-com-br.forumais.com https://twitter.com/Ketholy Suan
  • 0

Atendido / Resolvido Re: Widgets no fórum

Mensagem por Roger123 em 20.12.18 20:46

Olá,

Qual é o código que utiliza? Tente trocá-lo para o referido neste tópico.

Cordialmente.

Tópico movido de 'Questões sobre a aparência do fórum' para 'Questões sobre códigos'
Roger123

Roger123
Ajudeiro
Ajudeiro

Masculino
Inscrito dia : 30/06/2018
Mensagens : 1423
Pontos Ativos : 1711

Ver perfil do usuário https://ajuda.forumeiros.com
  • 0

Atendido / Resolvido Re: Widgets no fórum

Mensagem por Ketholy em 21.12.18 10:34

Não funcionou, aqui esta o código:

Código:
/******************************
** ======= FUNCTIONS ======= **
*******************************
** 00. fa_initForumModules
** 01. fa_navactif
** 02. fa_theme_changer
** 03. pseudoInputs
** 04. toolbar search mod
** 05. fae_sticky_nav_panel
** 06. image resizer
** 07. fae_toggle_category
** 08. sticky_nav_notifications
** 09. update_notifier
** 10. topic_icon_formatter
** 11. dark mode
** 12. copy code button
** 13. local frame styler
******************************/

// IMPORTANT DATA (DO NOT DELETE)
if (!window.FAE) {
  window.FAE = new Object();
}

FAE.board_lang =  'Português';


/* -- 00. fa_initForumModules -- */
// initiate the toggler for the widget columns
function fa_initForumModules(column_id) {
  var column = document.getElementById(column_id), menu;

  if (column) {
    column.insertAdjacentHTML('afterbegin', '<div class="title module_column_title">Menu Widget</div>');

    menu = document.createElement('A');
    menu.href = '#';
    menu.title = 'Alternar o widget menu';
    menu.className = 'widget_menu column_button_' + column_id + ' color-secondary';

    menu.onclick = function() {
      var column = document.getElementById(/left/.test(this.className) ? 'left' : 'right');

      $([this, column])[/active/.test(this.className) ? 'removeClass' : 'addClass']('active');
      return false;
    };

    document.body.appendChild(menu);
  }
};

// give active panels a very high z-index so they display above other panels and buttons
// forumotion replaces any z-index above 1000 w/999 in the stylesheet, so this must be applied via JS
document.write('<style type="text/css">'+
  '.module_column, .widget_menu { z-index:30000; }'+
  '.module_column.active, .widget_menu.active { z-index:99999; }'+
'</style>');


/* -- 01. fa_navactif -- */
// finds the currently active navigation item and adds a classname to it.
function fa_navactif() {
  for (var cleanURI = window.location.href.replace(/\?.*|#.*/, ''), a = document.getElementById('page-header').getElementsByTagName('A'), i = 0, j = a.length; i < j; i++) {
    if (/mainmenu/.test(a[i].className) && cleanURI == a[i].href.replace(/\?.*|#.*/,'')) {
      a[i].className+=' fa_navactif';
      break;
    }
  }
  $('.mainmenu[href="/search"]').removeAttr('onclick');
};


/* -- 02. fa_theme_changer -- */
// theme selector for the forum
(function() {
  var cc = my_getcookie('fae_custom-theme');

  window.fa_theme_color = {
    selected : my_getcookie('fa_theme_color') || 'Selecionar um tema',

    palette : {
"Selecionar um tema" : [],
"Tema Personalizado" : [cc ? fae_editColor(cc, +1) : '#77AADD', cc || '#6699CC', cc ? fae_editColor(cc, -1) : '#5588BB', cc ? fae_editColor(cc, -3) : '#336699', cc ? fae_editColor(cc, 'darken') : '#334455'],
"Tema Aleatório" : [],
"Silver" : ["#DDDDDD", "#cccccc", "#BBBBBB", "#999999", "#555555"],
"Dusty Gray" : ["#AAAAAA", "#999999", "#888888", "#666666", "#444444"],
"Dove Gray" : ["#777777", "#666666", "#555555", "#333333", "#333333"],
"Mine Shaft" : ["#444444", "#333333", "#222222", "#000000", "#222222"],
"Persian Red" : ["#DD4444", "#cc3333", "#BB2222", "#990000", "#552222"],
"Christmas Red" : ["#CC3333", "#bb2222", "#AA1111", "#880000", "#441111"],
"Coral Red" : ["#FF5555", "#ff4444", "#EE3333", "#CC1111", "#662222"],
"Chestnut Rose" : ["#DD7777", "#cc6666", "#BB5555", "#993333", "#553333"],
"Eunry" : ["#DDAAAA", "#cc9999", "#BB8888", "#996666", "#554444"],
"Brandy Rose" : ["#CC9999", "#bb8888", "#AA7777", "#885555", "#443333"],
"Bazaar" : ["#AA8888", "#997777", "#886666", "#664444", "#443333"],
"Cinnabar" : ["#FF5544", "#ee4433", "#DD3322", "#BB1100", "#552222"],
"Crail" : ["#CC6655", "#bb5544", "#AA4433", "#882211", "#442222"],
"Flamingo" : ["#FF6644", "#ee5533", "#DD4422", "#BB2200", "#552222"],
"Red Damask" : ["#EE7755", "#dd6644", "#CC5533", "#AA3311", "#553322"],
"Tabasco" : ["#AA4422", "#993311", "#882200", "#660000", "#442211"],
"Paarl" : ["#BB6644", "#aa5533", "#994422", "#772200", "#442222"],
"Cape Palliser" : ["#BB7755", "#aa6644", "#995533", "#773311", "#443322"],
"Tuscany" : ["#DD7744", "#cc6633", "#BB5522", "#993300", "#553322"],
"Hot Cinnamon" : ["#EE7733", "#dd6622", "#CC5511", "#AA3300", "#553311"],
"Blaze Orange" : ["#FF7711", "#ff6600", "#EE5500", "#CC3300", "#663300"],
"Pumpkin" : ["#FF8822", "#ff7711", "#EE6600", "#CC4400", "#663311"],
"Antique Brass" : ["#DDAA77", "#cc9966", "#BB8855", "#996633", "#554433"],
"Raw Sienna" : ["#DD9955", "#cc8844", "#BB7733", "#995511", "#553322"],
"Earthtone" : ["#775533", "#664422", "#553311", "#331100", "#332211"],
"Americano" : ["#998877", "#887766", "#776655", "#554433", "#333333"],
"Coffee" : ["#887766", "#776655", "#665544", "#443322", "#333322"],
"Cinnamon" : ["#995511", "#884400", "#773300", "#551100", "#332200"],
"Brown" : ["#AA6611", "#995500", "#884400", "#662200", "#442200"],
"Sandy Tan" : ["#EECC99", "#ddbb88", "#CCAA77", "#AA8855", "#554433"],
"Hokey Pokey" : ["#DDAA44", "#cc9933", "#BB8822", "#996600", "#554422"],
"Sienna" : ["#776644", "#665533", "#554422", "#332200", "#332222"],
"Shadow" : ["#998866", "#887755", "#776644", "#554422", "#333322"],
"Buttercup" : ["#FFBB22", "#eeaa11", "#DD9900", "#BB7700", "#554411"],
"Tulip Tree" : ["#FFCC44", "#eebb33", "#DDAA22", "#BB8800", "#554422"],
"Golden Grass" : ["#EEBB33", "#ddaa22", "#CC9911", "#AA7700", "#554411"],
"Pizza" : ["#DDAA22", "#cc9911", "#BB8800", "#996600", "#554411"],
"Reef Gold" : ["#BB9933", "#aa8822", "#997711", "#775500", "#443311"],
"Olive" : ["#999911", "#888800", "#777700", "#555500", "#333300"],
"Camouflage" : ["#555522", "#444411", "#333300", "#111100", "#222211"],
"Avocado" : ["#999977", "#888866", "#777755", "#555533", "#333333"],
"Earls Green" : ["#DDDD44", "#cccc33", "#BBBB22", "#999900", "#555522"],
"Laser" : ["#DDDD77", "#cccc66", "#BBBB55", "#999933", "#555533"],
"Pine Glade" : ["#DDDDAA", "#cccc99", "#BBBB88", "#999966", "#555544"],
"Pea Green" : ["#88AA33", "#779922", "#668811", "#446600", "#334411"],
"Celery" : ["#AADD44", "#99cc33", "#88BB22", "#669900", "#445522"],
"Chartreuse" : ["#99EE11", "#88dd00", "#77CC00", "#55AA00", "#335500"],
"Forumactif Green" : ["#99DD44", "#88cc33", "#77BB22", "#559900", "#335522"],
"Dollar Bill" : ["#99CC66", "#88bb55", "#77AA44", "#558822", "#334422"],
"Wild Willow" : ["#AADD77", "#99cc66", "#88BB55", "#669933", "#445533"],
"Asparagus" : ["#88BB66", "#77aa55", "#669944", "#447722", "#334422"],
"Atlantis" : ["#77DD44", "#66cc33", "#55BB22", "#339900", "#335522"],
"Forest Green" : ["#339933", "#228822", "#117711", "#005500", "#113311"],
"Christmas Green" : ["#117711", "#006600", "#005500", "#003300", "#003300"],
"Apple" : ["#44DD44", "#33cc33", "#22BB22", "#009900", "#225522"],
"Mantis" : ["#77DD77", "#66cc66", "#55BB55", "#339933", "#335533"],
"De York" : ["#AADDAA", "#99cc99", "#88BB88", "#669966", "#445544"],
"Envy" : ["#99BB99", "#88aa88", "#779977", "#557755", "#334433"],
"Spruce" : ["#77DD88", "#66cc77", "#55BB66", "#339944", "#335533"],
"Bottle Green" : ["#22BB44", "#11aa33", "#009922", "#007700", "#114422"],
"Aqua Forest" : ["#77BB88", "#66aa77", "#559966", "#337744", "#334433"],
"Mountain Meadow" : ["#44DD77", "#33cc66", "#22BB55", "#009933", "#225533"],
"Meadow" : ["#33BB66", "#22aa55", "#119944", "#007722", "#114422"],
"Sea Green" : ["#449966", "#338855", "#227744", "#005522", "#223322"],
"Amazon" : ["#448866", "#337755", "#226644", "#004422", "#223322"],
"Emerald" : ["#77DDAA", "#66cc99", "#55BB88", "#339966", "#335544"],
"Shamrock" : ["#44DDAA", "#33cc99", "#22BB88", "#009966", "#225544"],
"Blue Lagoon" : ["#55CCBB", "#44bbaa", "#33AA99", "#118877", "#224444"],
"Turquoise" : ["#44DDDD", "#33cccc", "#22BBBB", "#009999", "#225555"],
"Downy" : ["#77DDDD", "#66cccc", "#55BBBB", "#339999", "#335555"],
"Sinbad" : ["#AADDDD", "#99cccc", "#88BBBB", "#669999", "#445555"],
"Teal" : ["#119999", "#008888", "#007777", "#005555", "#003333"],
"Blue Chill" : ["#2299AA", "#118899", "#007788", "#005566", "#113344"],
"Cerulean" : ["#11BBEE", "#00aadd", "#0099CC", "#0077AA", "#004455"],
"Deep Cerulean" : ["#1188BB", "#0077aa", "#006699", "#004477", "#003344"],
"Curious Blue" : ["#44AADD", "#3399cc", "#2288BB", "#006699", "#224455"],
"Slate Gray" : ["#8899AA", "#778899", "#667788", "#445566", "#333344"],
"Danube" : ["#77AADD", "#6699cc", "#5588BB", "#336699", "#334455"],
"Azure Radiance" : ["#1188FF", "#0077ff", "#0066EE", "#0044CC", "#003366"],
"Mariner" : ["#4477DD", "#3366cc", "#2255BB", "#003399", "#223355"],
"Azure" : ["#4466BB", "#3355aa", "#224499", "#002277", "#222244"],
"Governor Bay" : ["#4444DD", "#3333cc", "#2222BB", "#000099", "#222255"],
"Blue Marguerite" : ["#7777DD", "#6666cc", "#5555BB", "#333399", "#333355"],
"Blue Bell" : ["#AAAADD", "#9999cc", "#8888BB", "#666699", "#444455"],
"Comet" : ["#666688", "#555577", "#444466", "#222244", "#222233"],
"Purple Heart" : ["#7744DD", "#6633cc", "#5522BB", "#330099", "#332255"],
"Amethyst" : ["#AA77DD", "#9966cc", "#8855BB", "#663399", "#443355"],
"Amethyst Smoke" : ["#BBAACC", "#aa99bb", "#9988AA", "#776688", "#444444"],
"Mauve" : ["#EEBBFF", "#ddaaff", "#CC99EE", "#AA77CC", "#554466"],
"Affair" : ["#8855AA", "#774499", "#663388", "#441166", "#332244"],
"Purple" : ["#AA44DD", "#9933cc", "#8822BB", "#660099", "#442255"],
"Lavendar" : ["#CC88EE", "#bb77dd", "#AA66CC", "#8844AA", "#443355"],
"Cerise" : ["#DD44DD", "#cc33cc", "#BB22BB", "#990099", "#552255"],
"Fuchsia Pink" : ["#DD77DD", "#cc66cc", "#BB55BB", "#993399", "#553355"],
"Lilac" : ["#DDAADD", "#cc99cc", "#BB88BB", "#996699", "#554455"],
"Red Violet" : ["#DD44AA", "#cc3399", "#BB2288", "#990066", "#552244"],
"Disco" : ["#992266", "#881155", "#770044", "#550022", "#331122"],
"Carnation Pink" : ["#FFAADD", "#ff99cc", "#EE88BB", "#CC6699", "#664455"],
"Hopbush" : ["#DD77AA", "#cc6699", "#BB5588", "#993366", "#553344"],
"French Rose" : ["#FF5599", "#ee4488", "#DD3377", "#BB1155", "#552233"],
"Hibiscus" : ["#DD4477", "#cc3366", "#BB2255", "#990033", "#552233"],
"Claret" : ["#882244", "#771133", "#660022", "#440000", "#331122"],
"Bordeaux" : ["#771133", "#660022", "#550011", "#330000", "#330011"],
"Tickle Me Pink" : ["#FF99BB", "#ff88aa", "#EE7799", "#CC5577", "#663344"],
"Burgundy" : ["#991133", "#880022", "#770011", "#550000", "#330011"],
"Blush" : ["#EE6688", "#dd5577", "#CC4466", "#AA2244", "#552233"],
"Wild Watermelon" : ["#FF6688", "#ff5577", "#EE4466", "#CC2244", "#662233"],
"Amaranth" : ["#FF4466", "#ee3355", "#DD2244", "#BB0022", "#552222"],
"Mauvelous" : ["#FFAABB", "#ff99aa", "#EE8899", "#CC6677", "#664444"],
"Alizarin Crimson" : ["#FF3344", "#ee2233", "#DD1122", "#BB0000", "#551122"]

},

    change : function(color) {
      var head = document.getElementsByTagName('HEAD')[0],
          style = document.getElementById('fa_theme_style');

      my_setcookie('fa_theme_color', color, true);

      if (color != 'Selecionar um tema' && color != 'Tema Personalizado') {
        fa_theme_color.selected = color == 'Tema Aleatório' ? fa_theme_color.palette['Tema Aleatório'][Math.floor(Math.random() * fa_theme_color.palette['Tema Aleatório'].length)] : color;
        fa_theme_color.selector.style.backgroundColor = fa_theme_color.palette[fa_theme_color.selected][1];
        fa_theme_color.selector.style.borderColor = fa_theme_color.palette[fa_theme_color.selected][2];
        fa_theme_color.selector.firstChild.innerHTML = 'Tema Padrão';

        if (style) head.removeChild(style);
        fa_theme_color.picker.style.display = 'none';

        $(head).append('<style type="text/css" id="fa_theme_style">' + fa_theme_color.css() + '</style>');

      } else if (color == 'Tema Personalizado') {
        fa_theme_color.selected = 'Tema Personalizado';

        if (style) {
          head.removeChild(style);
        }

        var val = fa_theme_color.picker.value.toUpperCase();
        my_setcookie('fae_custom-theme', val, true);

        fa_theme_color.picker.style.display = '';
        fa_theme_color.selector.style.backgroundColor = val;
        fa_theme_color.selector.style.borderColor = fae_editColor(val, -1);

        window.fa_theme_color.palette['Tema Personalizado'] = [
          fae_editColor(val, +1),
          val,
          fae_editColor(val, -1),
          fae_editColor(val, -3),
          fae_editColor(val, 'darken')
        ];

        $(head).append('<style type="text/css" id="fa_theme_style">' + fa_theme_color.css() + '</style>');

      } else {
        if (style) {
          head.removeChild(style);
        }

        fa_theme_color.picker.style.display = 'none';

        fa_theme_color.selector.style.backgroundColor = '#999';
        fa_theme_color.selector.style.borderColor = '#888';
        fa_theme_color.selector.firstChild.innerHTML = 'Selecionar um tema';
      }
    },

    css : function() {
      var palette = fa_theme_color.palette[fa_theme_color.selected];
      return '.color-primary, .title, h2.u, .h3, .inner h1.page-title, .mainmenu:after, .forumline tbody .catHead, form.search-form input.search-keywords, input.search-button, .pagination span a, a.button1, a.button2, button.button2, input.button1, input.button2, input.button, #profile-advanced-add a, img[src*="?poll"], .fa_pseudo_radio:after, #tabs, body div.sceditor-dropdown .button, .codebox dt, blockquote cite, .sceditor-container .sceditor-toolbar, body #fa_toolbar, body #fa_toolbar_hidden, body #fa_toolbar #fa_right #notif_list li.see_all, #fae_sticky_nav_panel a:after, img[src*="color=primary"], .table1 thead th, .breadcrumbs, input[type="button"], input[type="submit"], input[type="reset"], input[type="file"], .forumbg li.header, #chatbox_header, body #chatbox_footer { background-color:' + palette[1] + '; }'+
            '#cp-main h1:not(.title) { background-color:' + palette[1] + '; }'+
            '.pagination span a:hover, a.button1:hover, a.button2:hover, button.button2:hover, input.button1:hover, input.button2:hover, input.button:hover, #profile-advanced-add a:hover, input.search-button:hover, body div.sceditor-dropdown .button:hover, img[src*="color=primary"]:hover, input[type="button"]:hover, input[type="submit"]:hover, input[type="reset"]:hover, input[type="file"]:hover { background-color:' + palette[2] + '; }'+
            '.pagination span a:active, .pagination span a:focus, .pagination span strong, a.button1:active, a.button2:active, button.button2:active, input.button1:active, input.button2:active, input.button:active, input[type="button"]:active, input[type="submit"]:active, input[type="reset"]:active, input[type="file"]:active, a.button1:focus, a.button2:focus, button.button2:focus, input.button1:focus, input.button2:focus, input.button:focus, input.search-button:focus, #tabs a:after, body div.sceditor-dropdown .button:active, body div.sceditor-dropdown .button:focus, body #fa_search #fa_textarea, body #fa_search #fa_magnifier, img[src*="color=primary"]:active, input[type="button"]:focus, input[type="submit"]:focus, input[type="reset"]:focus, input[type="file"]:focus { background-color:' + palette[3] + '; }'+
            '.fa_pseudo_checkbox:after, h2.post-content, h3.post-content, h4.post-content, .codebox .fae_copy-code:before { color:' + palette[1] + '; }'+
            'img[src*="?poll"], .sceditor-container .sceditor-toolbar, .sceditor-container .sceditor-group, body #fa_toolbar, body #fa_toolbar_hidden { border-color:' + palette[2] + '; }'+
            '.color-secondary, .forum-status[style*="locked=true"], img[src*="color=secondary"] { background-color:' + palette[4] + '; }'+
            '.forum-status[style*="state=new"] { background-color:' + palette[0] + '; }'+
            'form.search-form { background-color:' + palette[2] + '; }'+
            'form.search-form input.search-keywords, input.search-button { border-color:' + palette[0] + '!important; }'+
            'input[type="text"]:hover, input.post:hover, input.inputbox:hover, textarea:hover, select:hover, input[type="text"]:focus, input.post:focus, input.inputbox:focus, textarea:focus, select:focus, body div.sceditor-dropdown input:focus, body div.sceditor-dropdown textarea:focus, .fa_pseudo_checkbox:hover, .fa_pseudo_radio:hover, .sceditor-container, h2.post-content, h3.post-content, h4.post-content, .lastpost-avatar, #wio_new_avatar, .avatar-mini img, .avatar, #chatbox, #chatbox_members, #chatbox_members > h4.away, #chatbox_members > ul.away-users, body #chatbox .cb-avatar { border-color:' + palette[1] + ' !important; }'+
            'a, a:link, a:visited { color:' + palette[3] + '; }'+
            'a:hover, a:active { color:' + palette[2] + '; }'+
            '::selection { background-color:' + palette[1] + '; } ::-moz-selection { background-color:' + palette[1] + '; }'+
            '::-webkit-scrollbar-thumb, ::-webkit-scrollbar-button:single-button { background-color:' + palette[1] + '; }'+
            '::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-button:single-button:hover { background-color:' + palette[2] + '; }'+
            '::-webkit-scrollbar-thumb:active, ::-webkit-scrollbar-button:single-button:active { background-color:' + palette[3] + '; }';
    }
  };

  var selector = document.createElement('SELECT'),
      picker = document.createElement('INPUT'),
      frag = document.createDocumentFragment(),
      opt,
      color,
      i;

  if (!fa_theme_color.palette[fa_theme_color.selected]) {
    for (i in fa_theme_color.palette) {
      fa_theme_color.selected = i;
      my_setcookie('fa_theme_color', i, true);
      break;
    }
  }

  selector.id = 'fa_theme_selector';
  selector.onchange = function() {
    fa_theme_color.change(this.value);
  };

  picker.id = 'fae_custom-theme';

  try {
    picker.type = 'color';
  } catch (error) {
    picker.type = 'text';
  }

  picker.value = cc || '#6699CC';
  picker.style.display = my_getcookie('fae_custom-theme') ? '' : 'none';
  picker.onchange = function () {
    fa_theme_color.change('Tema Personalizado');
  };

  for (i in fa_theme_color.palette) {
    opt = document.createElement('OPTION');
    color = /Tema Aleatório|Selecionar um tema|Tema Personalizado/.test(i) ? ['#FFF', '#000'] : [fa_theme_color.palette[i][2], ''];

    if (!/Tema Aleatório|Selecionar um tema|Tema Personalizado/.test(i)) {
      fa_theme_color.palette['Tema Aleatório'][fa_theme_color.palette['Tema Aleatório'].length] = i;
    }

    opt.value = i;
    opt.innerHTML = i;
    opt.selected = fa_theme_color.selected == i ? true : false;
    opt.style.backgroundColor = color[0];
    opt.style.color = color[1];

    frag.appendChild(opt);
  }

  selector.appendChild(frag);

  document.write('<style type="text/css">#fa_theme_selector { color:#FFF; border:1px solid transparent; float:left; outline:none; } #fae_custom-theme { margin:3px; float:left; }</style>');

  fa_theme_color.selector = selector;
  fa_theme_color.picker = picker;
  fa_theme_color.change(fa_theme_color.selected);

  $(function() {
    var body = document.getElementById('page-body');
    body.insertBefore(picker, body.firstChild);
    body.insertBefore(selector, body.firstChild);

    /* THEME CHANGER UI */
    if (fa_theme_color.selector) {
      var frag = document.createDocumentFragment();

      // create the theme picker
      window.fae_theme_picker = document.createElement('A');
      fae_theme_picker.href = '#';
      fae_theme_picker.dataset.selectedIndex = fa_theme_color.selector.selectedIndex;
      fae_theme_picker.innerHTML = fa_theme_color.selector.options[fa_theme_color.selector.selectedIndex].innerHTML;
      fae_theme_picker.style.width = fa_theme_color.selector.getBoundingClientRect().width - 12 + 'px';
      fae_theme_picker.style.backgroundColor = fa_theme_color.selector.style.backgroundColor;
      fae_theme_picker.style.borderColor = fa_theme_color.selector.style.borderColor;
      fae_theme_picker.id = 'fae_theme_picker';
      fae_theme_picker.onclick = function () {
        return false;
      };

      // show / hide the theme picker on click
      document.addEventListener('click', function (e) {
        var that = e.target;

        if (that.id == 'fae_theme_picker') {

          if (fae_theme_list.className == 'theme_list_hidden') {
            var offset = that.getBoundingClientRect(),
                selected = fae_theme_list.querySelector('[data-index="' + fae_theme_picker.dataset.selectedIndex + '"]');

            fae_theme_list.className = '';
            fae_theme_list.style.left = offset.left + 'px';
            fae_theme_list.style.marginTop = offset.height + 1 + 'px';

            fae_hover_theme(selected);
            fae_theme_list.scrollTop = (selected.offsetTop - fae_theme_list.getBoundingClientRect().height) + (selected.getBoundingClientRect().height + 2);

          } else {
            fae_theme_list.className = 'theme_list_hidden';
          }

        } else if (!fae_theme_list.className) {
          fae_theme_list.className = 'theme_list_hidden';
        }
      });

      // change the theme when the up or down arrows are pressed
      fae_theme_picker.onkeydown = function (e) {
        var index = +fae_theme_picker.dataset.selectedIndex;
            next = fae_theme_list.querySelector('[data-index="' + (e.keyCode == 38 ? index - 1 : e.keyCode == 40 ? index + 1 : index) + '"]');

        if (next && next.className != 'pseudo-hover') {
          next.click();
          fae_hover_theme(next);
        }

        return false;
      };

      // hover the selected option / last hovered option
      window.fae_hover_theme = function (that) {
        var hovered = document.querySelector('.pseudo-hover');

        if (hovered) {
          hovered.className = '';
        }

        that.className = 'pseudo-hover';
      };

      // change the theme picker style when the custom theme is changed
      document.getElementById('fae_custom-theme').addEventListener('change', function () {
        fae_theme_picker.style.backgroundColor = fa_theme_color.selector.style.backgroundColor;
        fae_theme_picker.style.borderColor = fa_theme_color.selector.style.borderColor;
      });


      // create the theme list
      window.fae_theme_list = document.createElement('DIV');
      fae_theme_list.id = 'fae_theme_list';
      fae_theme_list.className = 'theme_list_hidden';
      fae_theme_list.style.width = fa_theme_color.selector.getBoundingClientRect().width + 'px';

      // prevent unwanted window scrolling when the theme list has been scrolled all the way from the top or bottom
      fae_theme_list.onwheel = function (e) {
        if ((fae_theme_list.scrollTop == (fae_theme_list.scrollHeight - fae_theme_list.clientHeight) && e.deltaY > 0) || fae_theme_list.scrollTop == 0 && e.deltaY < 0) {
          return false;
        }
      };

      // hide the theme list on scroll
      window.addEventListener('scroll', function () {
        if (!fae_theme_list.className) {
          fae_theme_list.className = 'theme_list_hidden';
        }
      });

      // get the original theme options and create new options for the updated UI
      for (var opts = fa_theme_color.selector.options, i = 0, j = opts.length, option; i < j; i++) {
        option = document.createElement('A');
        option.href = '#';
        option.dataset.index = i;
        option.innerHTML = opts[i].innerHTML;
        option.style.color = opts[i].style.color || '#FFF';
        option.style.backgroundColor = opts[i].style.backgroundColor;

        // apply the selected theme to both the new UI and hidden select element
        option.onclick = function () {
          var color = fa_theme_color.selector.options[this.dataset.index];

          color.selected = true;
          fae_theme_picker.innerHTML = fa_theme_color.selector.value;
          fae_theme_picker.dataset.selectedIndex = this.dataset.index;

          fa_theme_color.change(color.value);

          fae_theme_picker.style.backgroundColor = fa_theme_color.selector.style.backgroundColor;
          fae_theme_picker.style.borderColor = fa_theme_color.selector.style.borderColor;

          fae_theme_list.className = 'theme_list_hidden';
          fae_theme_picker.focus();

          return false;
        };

        // update selected option on hover
        option.onmouseover = function () {
          fae_hover_theme(this);
        };

        fae_theme_list.appendChild(option);
      }

      // add the theme picker, list, and style to the document
      frag.appendChild(fae_theme_picker);
      frag.appendChild(fae_theme_list);

      $('head').append(
        '<style type="text/css">'+
          '#footer_end #fae_theme_list,#page-footer #fae_theme_list{margin-top:-335px!important}'+
          'a#fae_theme_picker{color:#FFF;font-size:13px;font-family:Arial;background:#999;border:1px solid #888;position:relative;display:inline-block;padding:6px;margin:1px;float:left;text-decoration:none;outline:none;}'+
          '#fae_theme_picker:after{content:"\\f0dd";font-family:FontAwesome;position:absolute;right:4px}'+
          '#fae_theme_list{background:#FFF;border:1px solid rgba(0,0,0,.175);position:absolute;max-height:335px;overflow:auto;overflow-x:hidden;z-index:10;white-space:nowrap;visibility:visible}'+
          '#fae_theme_list.theme_list_hidden{visibility:hidden}'+
          '#fae_theme_list a{font-family:Arial;display:block;padding:6px;text-decoration:none}'+
          '#fae_theme_list a.pseudo-hover{color:#FFF!important;background:#28F!important}'+
          '@media (max-width: 768px) and (min-width: 0px) {body #fae_theme_picker{float:right;width:240px !important;margin:0 0 6px}body #fae_theme_list{width:252px !important}}'+
        '</style>'
      );

      fa_theme_color.selector.parentNode.insertBefore(frag, fa_theme_color.selector);
      fa_theme_color.selector.style.display = 'none'; // hide to original theme selector element
    }

  });
}());

function fae_editColor (str, op) {
  var letter = { 'F' : 15, 'E' : 14, 'D' : 13, 'C' : 12, 'B' : 11, 'A' : 10 },
      hex = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B', 'C', 'D', 'E', 'F'],
      neg = [0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6];

  str = str.toUpperCase().split('');

  for (var i = 1; i < 7; i++) {
    if (letter[str[i]]) {
      str[i] = letter[str[i]];
    } else {
      str[i] = +str[i];
    }

    if (op == 'darken') {
      str[i] = neg[str[i]];
    } else {
      str[i] += op;
    }

    if (str[i] > 15) {
      str[i] = 15;
    } else if (str[i] < 0) {
      str[i] = 0;
    }

    str[i] = hex[str[i]];
  }

  return str.join('');
};


/* -- 03. pseudoInputs -- */
// function to hide all checkboxes / radios and replace them with pseudo inputs
$(function() {
  for (var input = document.getElementsByTagName('INPUT'), i = 0, j = input.length, type; i < j; i++) {
    type = input[i].type;
    if (/radio|checkbox/i.test(type)) {
      input[i].className += ' fa_input_hidden';
      input[i].insertAdjacentHTML('afterend', '<span class="fa_pseudo_' + type + '" onclick="this.previousSibling.click(); return false;"/>');
    }
  }
});


/* -- 04. toolbar search mod -- */
// gives the search bar a placeholder and attaches an event handler to the button
window.fa_textarea_placeholer = 'Buscar...';

$(function(){
  $(function() {
    var fa_magnifier = document.getElementById('fa_magnifier'),
        fa_textarea = document.getElementById('fa_textarea');

    if (fa_magnifier) {
      fa_magnifier.onclick = function() {
        this.parentNode.submit();
      };
    }

    if (fa_textarea) {
      fa_textarea.value = fa_textarea_placeholer;

      fa_textarea.onfocus = function() {
        if (this.value == fa_textarea_placeholer) {
          this.value = '';
        }
      };

      fa_textarea.onblur = function() {
        if (!this.value) {
          this.value = fa_textarea_placeholer;
        }
      };

    }

  });
});


/* -- 05. fae_sticky_nav_panel -- */
// adds a sticky navigation for quick use when the navbar isn't visible
$(function() {
  window.fae_sticky = {
            // various user options
            navbar : 'navbar',
          position : 'right',
            title : 'Navegação Rápida',
          tooltip : 'Alternar Navegação Rápida',
    additionalHTML : '<div class="nav-actions"><a href="javascript:fae_sticky.copyURL();" title="Copiar BBCode URL"><i class="fa fa-link"></i></a>' + ( _userdata.user_level == 1 ? '<a href="/admin" title="Painel Admin"><i class="fa fa-wrench"></i></a>' : '' ) + '<a href="#top" title="Início da Página"><i class="fa fa-chevron-up"></i></a><a href="#bottom" title="Fim da Página"><i class="fa fa-chevron-down"></i></a></div>',
    alwaysVisible : false,

    // copy page URL as bbcode
    copyURL : function() {
      window.prompt('Copiar o BBCode URL abaixo. (CTRL+C)', '[url=' + window.location + ']' + document.title + '[/url]');
    },

    // listen for changes in the navbar's bottom rect
    scroll : function() {
      var rect = fae_sticky.navbar.getBoundingClientRect(),
          position = fae_sticky.node[0].style[fae_sticky.position];

      if (rect.bottom <= fae_sticky.offset[fae_sticky.tb_state] && position == '-30px') {
        fae_sticky.node[0].style[fae_sticky.position] = '';
      } else if (rect.bottom > fae_sticky.offset[fae_sticky.tb_state] && position != '-30px') {
        fae_sticky.node[0].style[fae_sticky.position] = '-30px';
        $(fae_sticky.node).removeClass('active');
      }
    },

    // offsets for when the toolbar is hidden / shown
    offset : {
      fa_hide : 0,
      fa_show : 30
    }
  };

  // nodes used in the module
  fae_sticky.node = [
    // button
    $('<a class="widget_menu column_button_' + fae_sticky.position + ' color-secondary" />').attr({
      href : '#',
        id : 'fa_sticky_nav_button',
      style : fae_sticky.position + ':-30px;',
      title : fae_sticky.tooltip

    }).click(function() {
      $(fae_sticky.node)[/active/.test(this.className) ? 'removeClass' : 'addClass']('active');
      return false;
    })[0],

    // panel
    $('<div id="fae_sticky_nav_panel" class="module_column column_' + fae_sticky.position + ' color-secondary" />')
    .html('<div class="title module_column_title">' + fae_sticky.title + '</div><div class="module_inner"></div>')[0]
  ];

  fae_sticky.navbar = document.getElementById(fae_sticky.navbar); // get the old navbar

  // then clone its contents and add it to the sticky panel
  $('.module_inner', fae_sticky.node[1]).append($('a.mainmenu', fae_sticky.navbar).clone()).append(fae_sticky.additionalHTML);
  $(document.body).append(fae_sticky.node);

  if (!fae_sticky.alwaysVisible) {
    fae_sticky.tb_state = my_getcookie('toolbar_state') || (_userdata.activate_toolbar ? 'fa_show' : 'fa_hide');
    fae_sticky.scroll();

    $(window).scroll(fae_sticky.scroll);

    $(function() {
      $('#fa_hide, #fa_show').click(function() {
        fae_sticky.tb_state = this.id;
      });
    });
  } else {
    fae_sticky.node[0].style[fae_sticky.position] = '';
  }
});


/* -- 06. image resizer -- */
(function() {
  window.fa_img_resizer = {
    max_width : 400, // maximum image width (400px)
    max_height : 250, // maximum image height (250px)

    selector : '.postbody .content img, .mod_news img, .message-text img', // where images should be resized

    options : {
            bar : true, // resized image options bar
        toggler : true, // Enlarge / Reduce Image
      full_size : true, // Mostrar tamanho grande
      download : false, // Baixar imagem link
      lightbox : true // lightbox effect
    },

    // texts
    lang : {
      full_size : '<i class="fa fa-external-link"></i> Mostrar tamanho grande',
        enlarge : '<i class="fa fa-search-plus"></i> Aumentar imagem',
        reduce : '<i class="fa fa-search-minus"></i> Reduzir imagem',
      download : '<i class="fa fa-download"></i> Baixar imagem',
      tooltip : 'Clique para ver imagem completa'
    },

    // resize all images inside the "resizeIn" elements
    resize : function() {
      for (var a = $(fa_img_resizer.selector), i = 0, j = a.length; i < j; i++) {
        if (!a[i].alt && (a[i].naturalWidth > fa_img_resizer.max_width || a[i].naturalHeight > fa_img_resizer.max_height)) {
          a[i].className += ' fa_img_reduced';

          // make the image a "link" if it's not wrapper with one
          if (fa_img_resizer.options.lightbox && a[i].parentNode.tagName != 'A') {
            a[i].style.cursor = 'pointer';
            a[i].title = fa_img_resizer.lang.tooltip;

            a[i].onclick = function() {
              fa_img_resizer.lightbox(this);
            };
          }

          // create the resize bar
          if (fa_img_resizer.options.bar) {
            (a[i].parentNode.tagName == 'A' ? a[i].parentNode : a[i]).insertAdjacentHTML('beforebegin',
              '<div class="fa_img_resizer" style="width:' + (a[i].width - 8) + 'px;">'+
                (fa_img_resizer.options.toggler ? '<a class="fa_img_enlarge" href="#" onclick="fa_img_resizer.toggle(this); return false;">' + fa_img_resizer.lang.enlarge + '</a>' : '')+
                (fa_img_resizer.options.full_size ? '<a class="fa_img_full" href="/viewimage.forum?u=' + a[i].src + '" target="_blank">' + fa_img_resizer.lang.full_size + '</a>' : '')+
                (fa_img_resizer.options.download && !/Firefox/.test(navigator.userAgent) && 'download' in document.createElement('A') ? '<a class="fa_img_download" href="' + a[i].src + '" target="_blank" download>' + fa_img_resizer.lang.download + '</a>' : '' )+
              '</div>'
            );
          }
        }
      }
    },

    // toggle between enlarged and reduced image sizes
    toggle : function(that) {
      var img = that.parentNode.nextSibling;

      if (img.tagName == 'A') {
        img = img.getElementsByTagName('IMG')[0];
      }

      if (/fa_img_reduced/.test(img.className)) {
        that.innerHTML = fa_img_resizer.lang.reduce;
        that.className = 'fa_img_reduce';
        img.className = img.className.replace(/fa_img_reduced/, 'fa_img_enlarged');
      } else {
        that.innerHTML = fa_img_resizer.lang.enlarge;
        that.className = 'fa_img_enlarge';
        img.className = img.className.replace(/fa_img_enlarged/, 'fa_img_reduced');
      }

      that.parentNode.style.width = img.width - 8 + 'px';
    },

    // lightbox effect
    lightbox : function(that) {
      var frag = document.createDocumentFragment(),
          overlay = $('<div id="fa_img_lb_overlay" />')[0],
          img = $('<img id="fa_img_lb_image" src="' + that.src + '" />')[0];

      overlay.onclick = fa_img_resizer.kill_lightbox;
      img.onclick = fa_img_resizer.kill_lightbox;

      frag.appendChild(overlay);
      frag.appendChild(img);
      document.body.appendChild(frag);
      document.body.style.overflow = 'hidden';

      img.style.marginTop = '-' + (img.height / 2) + 'px';
      img.style.marginLeft = '-' + (img.width / 2) + 'px';
    },

    // kill the lightbox
    kill_lightbox : function() {
      var overlay = document.getElementById('fa_img_lb_overlay'),
          img = document.getElementById('fa_img_lb_image');

      overlay && document.body.removeChild(overlay);
      img && document.body.removeChild(img);
      document.body.style.overflow = '';
    }
  };

  // write styles into the document head
  document.write(
    '<style type="text/css">'+
      fa_img_resizer.selector + ', .fa_img_reduced { max-width:' + fa_img_resizer.max_width + 'px; max-height:' + fa_img_resizer.max_height + 'px; }'+
      '.fa_img_enlarged { max-width:100% !important; max-height:100% !important; }'+
      '.fa_img_resizer { font-size:12px; text-align:left; padding:3px; margin:3px 0; background:#FFF; border:1px solid #CCC; }'+
      '.fa_img_resizer a { display:inline-block; margin:0 3px; }'+
      '.fa_img_resizer i { font-size:14px; vertical-align:middle; }'+
      '#fa_img_lb_overlay { background:rgba(0, 0, 0, 0.7); position:fixed; top:0; right:0; bottom:0; left:0; z-index:999999; cursor:pointer; }'+
      '#fa_img_lb_image { max-height:100%; max-width:100%; position:fixed; left:50%; top:50%; z-index:9999999; cursor:pointer; }'+
    '</style>'
  );

  // begin modifying images when the page is loaded
  $(window).load(fa_img_resizer.resize);

  // kill forumactif's image resizer
  if (window.resize_images) {
    window.resize_images = function() {
      return false;
    };
  }
}());


/* -- 07. fae_toggle_category -- */
function fae_toggle_category(that) {
  var next = that.nextSibling;
  that.className = 'title ';

  if (next.style.display == 'none') {
    next.style.display = '';
    that.className += 'c_hide';
    my_setcookie('fae_' + next.id, 'shown');
  } else {
    next.style.display = 'none';
    that.className += 'c_show';
    my_setcookie('fae_' + next.id, 'hidden');
  }
};


/* -- 08. sticky_nav_notifications -- */
$(function() {
  if (_userdata.session_logged_in) {
    var nav = document.getElementById('fae_sticky_nav_panel'),
        a = $('<a class="mainmenu" href="/profile?mode=editprofile&page_profil=notifications">Notificações</a>')[0];

    if (nav) {
      $('a[href="/privmsg?folder=inbox"]', nav).after(a);

      $.get('/notification.forum', function(o) {
        if (o && o.unread) {
          a.insertAdjacentHTML('beforeend', ' <span id="sticky_notif_unread">(' + o.unread + ')</span>');
        }
      }, 'json');
    }
  }
});


/* -- 09. update_notifier -- */
$(function() {
  if (_userdata.user_id == 1 && !my_getcookie('fae_update_alerted')) {

    $.get('https://raw.githubusercontent.com/SethClydesdale/forumactif-edge/master/javascripts/version-data.js', function(d) {
      var script = document.createElement('SCRIPT');
      script.type = 'text/javascript';
      script.text = d.replace(/forumactif_edge_version_data/, 'fae_github_version_data');
      document.body.appendChild(script);

      if (forumactif_edge_version_data.length < fae_github_version_data.length) {
        alert('An update has been found for Forumactif Edge. When you\'re ready, please proceed to your FAE Control Panel and click "Check for updates" to begin the update process.');
      }

      my_setcookie('fae_update_alerted', '1');
    });

  }
});


/* -- 10. topic_icon_formatter -- */
$(function() {
  var a = $('.forum-info[style*="background-image"]'),
      i = 0,
      j = a.length;

  if (j) {
    for (; i < j; i++) {
      a[i].insertAdjacentHTML('afterbegin', '<img class="topic-icon" src="' + a[i].style.backgroundImage.replace(/.*?url\((.*?)\).*/, '$1').replace(/'|"/g, '') + '" />');
      a[i].style.backgroundImage = '';
    }

    $('head').append('<style type="text/css">.topic-icon{vertical-align:middle;margin:0 3px;}</style>');
  }
});


/* -- 11. dark mode -- */
(function() {
  window.fae_lightSwitchMode = my_getcookie('fae_light-switch-mode') || 'dark';

  document.write('<style type="text/css">#fae_light-switch-container{margin:6px 0}#fae_light-switch-label{font-weight:700;vertical-align:middle}#fae_light-switch{background-color:rgba(0,0,0,.25);vertical-align:middle;display:inline-block;position:relative;height:26px;width:56px;border-radius:20px;cursor:pointer;overflow:hidden}#fae_light-switch>input{display:none}#fae_light-switch>div{background-color:rgba(255,255,255,.5);position:absolute;top:3px;left:3px;height:20px;width:20px;border-radius:20px;transition:.4s;font-size:13px;font-weight:700;line-height:22px}#fae_light-switch>div:before{content:"ON";margin-left:-24px;color:transparent;transition:.4s}#fae_light-switch>div:after{content:"OFF";margin-left:30px;color:rgba(255,255,255,.5);transition:.4s}#fae_light-switch>input:checked+div{background-color:#FFF;left:33px}#fae_light-switch>input:checked+div:before{color:#FFF}#fae_light-switch>input:checked+div:after{color:transparent}</style>');

  var footer = '.footer-links.left',

      cookie = my_getcookie('fae_light-switch'),
      rgb,
      button,
      container,

      changeTheme = function (cookie) {
        var button = document.querySelector('#fae_light-switch input');

        if ((button && button.checked) || cookie == 'on') {
          my_setcookie('fae_light-switch', 'on', true);

          if (window.sessionStorage && window.sessionStorage.faeLightSwitch) {
            $('head').append('<style type="text/css" id="fae_light-switch-css">' + window.sessionStorage.faeLightSwitch + '</style>');
          } else {
            $.get('https://raw.githubusercontent.com/SethClydesdale/forumactif-edge/master/css/dark-mode/' + fae_lightSwitchMode + '-mode.min.css', function (d) {
              $('head').append('<style type="text/css" id="fae_light-switch-css">' + d + '</style>');

              if (window.sessionStorage) {
                window.sessionStorage.faeLightSwitch = d;
              }
            });
          }

        } else {
          var css = document.getElementById('fae_light-switch-css');

          my_setcookie('fae_light-switch', 'off', true);

          if (css) {
            document.head.removeChild(css);
          }
        }
      };

  cookie && changeTheme(cookie);

  $(function() {
    if (!my_getcookie('fae_light-switch-mode')) {
      rgb = window.getComputedStyle(document.body, null).getPropertyValue('background-color').replace(/rgb\(|\)|\s/g, '').split(',');
      fae_lightSwitchMode = Math.round(((parseInt(rgb[0]) * 299) + (parseInt(rgb[1]) * 587) + (parseInt(rgb[2]) * 114)) /1000) > 125 ? 'dark' : 'light';

      my_setcookie('fae_light-switch-mode', fae_lightSwitchMode, true);
    }

    footer = document.querySelector(footer);

    if (footer) {
      button = document.createElement('LABEL');
      button.id = 'fae_light-switch';
      button.innerHTML = '<input type="checkbox" ' + (cookie == 'on' ? 'checked="true"' : '') + '/><div></div>';
      button.firstChild.onchange = changeTheme;

      container = document.createElement('DIV');
      container.id = 'fae_light-switch-container';
      container.innerHTML = '<span id="fae_light-switch-label">' + (fae_lightSwitchMode == 'dark' ? 'Modo Escuro:' : 'Modo Claro:') + '</span>';

      container.appendChild(button);
      footer.appendChild(container);
    }
  });
}());


/* -- 12. copy code button -- */
$.getScript('https://cdn.jsdelivr.net/clipboard.js/1.5.16/clipboard.min.js', function() {
  window.fae_copyCode = {
    copy : 'Copiar Código',
    copied : 'Copiado!'
  };

  $(function() {
    var a = $('.codebox dt').not('.spoiler > dt, .hidecode > dt'),
        i = 0,
        j = a.length;

    if (a[0]) {
      $('head').append('<style type="text/css">.fae_copy-code{float:right;cursor:pointer}.fae_copy-code:before{content:"\\f0ea";font-size:13px;font-family:FontAwesome;text-align:center;color:#69C;background:#FFF;border-radius:100%;display:inline-block;width:19px;height:19px;line-height:19px;margin:-1px 3px 0 3px}.codebox .fae_copy-code:hover:before{color:#EB5}.codebox .fae_copy-code.fae_copied:before{content:"\\f00c";font-weight:700;color:#8B5}</style>');

      for (; i < j; i++) {
        a[i].insertAdjacentHTML('beforeend', '<span class="fae_copy-code">' + fae_copyCode.copy + '</span>');
      }

      new Clipboard('.fae_copy-code',{
        target : function (copy) {
          if (copy.innerHTML != fae_copyCode.copied) {
            return $(copy).closest('.codebox').find('code')[0];
          }
        }
      }).on('success', function (e) {
        var copy = e.trigger;

        if (copy.innerHTML != fae_copyCode.copied) {
          copy.innerHTML = fae_copyCode.copied;
          copy.className += ' fae_copied';

          window.setTimeout(function() {
            copy.innerHTML = fae_copyCode.copy;
            copy.className = copy.className.replace('fae_copied', '');
          }, 1000);
        }

        e.clearSelection();
      });
    }

  });
});



/* -- 13. local frame styler -- */
// global function for getting local iframes
function fae_styleLocalFrames () {
  var frame = $('iframe[src^="/"], object[data^="/"]'),
      i = 0,
      j = frame.length;

  for (; i < j; i++) {
    try {
      var head = $('head', frame[i].contentDocument || frame[i].contentWindow.document);

      $('#fa_theme_style, #fae_light-switch-css', head).remove();
      head.append($('#fa_theme_style, #fae_light-switch-css').clone());

    } catch (error) {
      window.console && console.log(error);
    }
  }

};


// waits for frames to load (such as chatbox and smilies) and then applies preferred styles to them
$(window).load(function() {
  fae_styleLocalFrames();
  $('iframe[src^="/"]').on('load', fae_styleLocalFrames);
  $('object[data^="/"]').attr('onload', 'fae_styleLocalFrames();');
  $('#fae_custom-theme, #fa_theme_selector, #fae_light-switch input').on('change', fae_styleLocalFrames);
});
Ketholy

Ketholy
Membro do Fórum

Feminino
Inscrito dia : 20/01/2017
Mensagens : 1297
Pontos Ativos : 1558

Ver perfil do usuário http://jogosrpg-com-br.forumais.com/forum http://assuntosgeral-com-br.forumais.com https://twitter.com/Ketholy Suan

Atendido / Resolvido Re: Widgets no fórum

Mensagem por Pedxz em 21.12.18 11:35

Olá @Ketholy,
Mude o script em cima para:
Código:
/******************************
** ======= FUNCTIONS ======= **
*******************************
** 00. fa_initForumModules (REMOVIDO)
** 01. fa_navactif
** 02. fa_theme_changer
** 03. pseudoInputs
** 04. toolbar search mod
** 05. fae_sticky_nav_panel
** 06. image resizer
** 07. fae_toggle_category
** 08. sticky_nav_notifications
** 09. update_notifier
** 10. topic_icon_formatter
** 11. dark mode
** 12. copy code button
** 13. local frame styler
******************************/

// IMPORTANT DATA (DO NOT DELETE)
if (!window.FAE) {
  window.FAE = new Object();
}

FAE.board_lang =  'Português';

/* -- 01. fa_navactif -- */
// finds the currently active navigation item and adds a classname to it.
function fa_navactif() {
  for (var cleanURI = window.location.href.replace(/\?.*|#.*/, ''), a = document.getElementById('page-header').getElementsByTagName('A'), i = 0, j = a.length; i < j; i++) {
    if (/mainmenu/.test(a[i].className) && cleanURI == a[i].href.replace(/\?.*|#.*/,'')) {
      a[i].className+=' fa_navactif';
      break;
    }
  }
  $('.mainmenu[href="/search"]').removeAttr('onclick');
};


/* -- 02. fa_theme_changer -- */
// theme selector for the forum
(function() {
  var cc = my_getcookie('fae_custom-theme');

  window.fa_theme_color = {
    selected : my_getcookie('fa_theme_color') || 'Selecionar um tema',

    palette : {
"Selecionar um tema" : [],
"Tema Personalizado" : [cc ? fae_editColor(cc, +1) : '#77AADD', cc || '#6699CC', cc ? fae_editColor(cc, -1) : '#5588BB', cc ? fae_editColor(cc, -3) : '#336699', cc ? fae_editColor(cc, 'darken') : '#334455'],
"Tema Aleatório" : [],
"Silver" : ["#DDDDDD", "#cccccc", "#BBBBBB", "#999999", "#555555"],
"Dusty Gray" : ["#AAAAAA", "#999999", "#888888", "#666666", "#444444"],
"Dove Gray" : ["#777777", "#666666", "#555555", "#333333", "#333333"],
"Mine Shaft" : ["#444444", "#333333", "#222222", "#000000", "#222222"],
"Persian Red" : ["#DD4444", "#cc3333", "#BB2222", "#990000", "#552222"],
"Christmas Red" : ["#CC3333", "#bb2222", "#AA1111", "#880000", "#441111"],
"Coral Red" : ["#FF5555", "#ff4444", "#EE3333", "#CC1111", "#662222"],
"Chestnut Rose" : ["#DD7777", "#cc6666", "#BB5555", "#993333", "#553333"],
"Eunry" : ["#DDAAAA", "#cc9999", "#BB8888", "#996666", "#554444"],
"Brandy Rose" : ["#CC9999", "#bb8888", "#AA7777", "#885555", "#443333"],
"Bazaar" : ["#AA8888", "#997777", "#886666", "#664444", "#443333"],
"Cinnabar" : ["#FF5544", "#ee4433", "#DD3322", "#BB1100", "#552222"],
"Crail" : ["#CC6655", "#bb5544", "#AA4433", "#882211", "#442222"],
"Flamingo" : ["#FF6644", "#ee5533", "#DD4422", "#BB2200", "#552222"],
"Red Damask" : ["#EE7755", "#dd6644", "#CC5533", "#AA3311", "#553322"],
"Tabasco" : ["#AA4422", "#993311", "#882200", "#660000", "#442211"],
"Paarl" : ["#BB6644", "#aa5533", "#994422", "#772200", "#442222"],
"Cape Palliser" : ["#BB7755", "#aa6644", "#995533", "#773311", "#443322"],
"Tuscany" : ["#DD7744", "#cc6633", "#BB5522", "#993300", "#553322"],
"Hot Cinnamon" : ["#EE7733", "#dd6622", "#CC5511", "#AA3300", "#553311"],
"Blaze Orange" : ["#FF7711", "#ff6600", "#EE5500", "#CC3300", "#663300"],
"Pumpkin" : ["#FF8822", "#ff7711", "#EE6600", "#CC4400", "#663311"],
"Antique Brass" : ["#DDAA77", "#cc9966", "#BB8855", "#996633", "#554433"],
"Raw Sienna" : ["#DD9955", "#cc8844", "#BB7733", "#995511", "#553322"],
"Earthtone" : ["#775533", "#664422", "#553311", "#331100", "#332211"],
"Americano" : ["#998877", "#887766", "#776655", "#554433", "#333333"],
"Coffee" : ["#887766", "#776655", "#665544", "#443322", "#333322"],
"Cinnamon" : ["#995511", "#884400", "#773300", "#551100", "#332200"],
"Brown" : ["#AA6611", "#995500", "#884400", "#662200", "#442200"],
"Sandy Tan" : ["#EECC99", "#ddbb88", "#CCAA77", "#AA8855", "#554433"],
"Hokey Pokey" : ["#DDAA44", "#cc9933", "#BB8822", "#996600", "#554422"],
"Sienna" : ["#776644", "#665533", "#554422", "#332200", "#332222"],
"Shadow" : ["#998866", "#887755", "#776644", "#554422", "#333322"],
"Buttercup" : ["#FFBB22", "#eeaa11", "#DD9900", "#BB7700", "#554411"],
"Tulip Tree" : ["#FFCC44", "#eebb33", "#DDAA22", "#BB8800", "#554422"],
"Golden Grass" : ["#EEBB33", "#ddaa22", "#CC9911", "#AA7700", "#554411"],
"Pizza" : ["#DDAA22", "#cc9911", "#BB8800", "#996600", "#554411"],
"Reef Gold" : ["#BB9933", "#aa8822", "#997711", "#775500", "#443311"],
"Olive" : ["#999911", "#888800", "#777700", "#555500", "#333300"],
"Camouflage" : ["#555522", "#444411", "#333300", "#111100", "#222211"],
"Avocado" : ["#999977", "#888866", "#777755", "#555533", "#333333"],
"Earls Green" : ["#DDDD44", "#cccc33", "#BBBB22", "#999900", "#555522"],
"Laser" : ["#DDDD77", "#cccc66", "#BBBB55", "#999933", "#555533"],
"Pine Glade" : ["#DDDDAA", "#cccc99", "#BBBB88", "#999966", "#555544"],
"Pea Green" : ["#88AA33", "#779922", "#668811", "#446600", "#334411"],
"Celery" : ["#AADD44", "#99cc33", "#88BB22", "#669900", "#445522"],
"Chartreuse" : ["#99EE11", "#88dd00", "#77CC00", "#55AA00", "#335500"],
"Forumactif Green" : ["#99DD44", "#88cc33", "#77BB22", "#559900", "#335522"],
"Dollar Bill" : ["#99CC66", "#88bb55", "#77AA44", "#558822", "#334422"],
"Wild Willow" : ["#AADD77", "#99cc66", "#88BB55", "#669933", "#445533"],
"Asparagus" : ["#88BB66", "#77aa55", "#669944", "#447722", "#334422"],
"Atlantis" : ["#77DD44", "#66cc33", "#55BB22", "#339900", "#335522"],
"Forest Green" : ["#339933", "#228822", "#117711", "#005500", "#113311"],
"Christmas Green" : ["#117711", "#006600", "#005500", "#003300", "#003300"],
"Apple" : ["#44DD44", "#33cc33", "#22BB22", "#009900", "#225522"],
"Mantis" : ["#77DD77", "#66cc66", "#55BB55", "#339933", "#335533"],
"De York" : ["#AADDAA", "#99cc99", "#88BB88", "#669966", "#445544"],
"Envy" : ["#99BB99", "#88aa88", "#779977", "#557755", "#334433"],
"Spruce" : ["#77DD88", "#66cc77", "#55BB66", "#339944", "#335533"],
"Bottle Green" : ["#22BB44", "#11aa33", "#009922", "#007700", "#114422"],
"Aqua Forest" : ["#77BB88", "#66aa77", "#559966", "#337744", "#334433"],
"Mountain Meadow" : ["#44DD77", "#33cc66", "#22BB55", "#009933", "#225533"],
"Meadow" : ["#33BB66", "#22aa55", "#119944", "#007722", "#114422"],
"Sea Green" : ["#449966", "#338855", "#227744", "#005522", "#223322"],
"Amazon" : ["#448866", "#337755", "#226644", "#004422", "#223322"],
"Emerald" : ["#77DDAA", "#66cc99", "#55BB88", "#339966", "#335544"],
"Shamrock" : ["#44DDAA", "#33cc99", "#22BB88", "#009966", "#225544"],
"Blue Lagoon" : ["#55CCBB", "#44bbaa", "#33AA99", "#118877", "#224444"],
"Turquoise" : ["#44DDDD", "#33cccc", "#22BBBB", "#009999", "#225555"],
"Downy" : ["#77DDDD", "#66cccc", "#55BBBB", "#339999", "#335555"],
"Sinbad" : ["#AADDDD", "#99cccc", "#88BBBB", "#669999", "#445555"],
"Teal" : ["#119999", "#008888", "#007777", "#005555", "#003333"],
"Blue Chill" : ["#2299AA", "#118899", "#007788", "#005566", "#113344"],
"Cerulean" : ["#11BBEE", "#00aadd", "#0099CC", "#0077AA", "#004455"],
"Deep Cerulean" : ["#1188BB", "#0077aa", "#006699", "#004477", "#003344"],
"Curious Blue" : ["#44AADD", "#3399cc", "#2288BB", "#006699", "#224455"],
"Slate Gray" : ["#8899AA", "#778899", "#667788", "#445566", "#333344"],
"Danube" : ["#77AADD", "#6699cc", "#5588BB", "#336699", "#334455"],
"Azure Radiance" : ["#1188FF", "#0077ff", "#0066EE", "#0044CC", "#003366"],
"Mariner" : ["#4477DD", "#3366cc", "#2255BB", "#003399", "#223355"],
"Azure" : ["#4466BB", "#3355aa", "#224499", "#002277", "#222244"],
"Governor Bay" : ["#4444DD", "#3333cc", "#2222BB", "#000099", "#222255"],
"Blue Marguerite" : ["#7777DD", "#6666cc", "#5555BB", "#333399", "#333355"],
"Blue Bell" : ["#AAAADD", "#9999cc", "#8888BB", "#666699", "#444455"],
"Comet" : ["#666688", "#555577", "#444466", "#222244", "#222233"],
"Purple Heart" : ["#7744DD", "#6633cc", "#5522BB", "#330099", "#332255"],
"Amethyst" : ["#AA77DD", "#9966cc", "#8855BB", "#663399", "#443355"],
"Amethyst Smoke" : ["#BBAACC", "#aa99bb", "#9988AA", "#776688", "#444444"],
"Mauve" : ["#EEBBFF", "#ddaaff", "#CC99EE", "#AA77CC", "#554466"],
"Affair" : ["#8855AA", "#774499", "#663388", "#441166", "#332244"],
"Purple" : ["#AA44DD", "#9933cc", "#8822BB", "#660099", "#442255"],
"Lavendar" : ["#CC88EE", "#bb77dd", "#AA66CC", "#8844AA", "#443355"],
"Cerise" : ["#DD44DD", "#cc33cc", "#BB22BB", "#990099", "#552255"],
"Fuchsia Pink" : ["#DD77DD", "#cc66cc", "#BB55BB", "#993399", "#553355"],
"Lilac" : ["#DDAADD", "#cc99cc", "#BB88BB", "#996699", "#554455"],
"Red Violet" : ["#DD44AA", "#cc3399", "#BB2288", "#990066", "#552244"],
"Disco" : ["#992266", "#881155", "#770044", "#550022", "#331122"],
"Carnation Pink" : ["#FFAADD", "#ff99cc", "#EE88BB", "#CC6699", "#664455"],
"Hopbush" : ["#DD77AA", "#cc6699", "#BB5588", "#993366", "#553344"],
"French Rose" : ["#FF5599", "#ee4488", "#DD3377", "#BB1155", "#552233"],
"Hibiscus" : ["#DD4477", "#cc3366", "#BB2255", "#990033", "#552233"],
"Claret" : ["#882244", "#771133", "#660022", "#440000", "#331122"],
"Bordeaux" : ["#771133", "#660022", "#550011", "#330000", "#330011"],
"Tickle Me Pink" : ["#FF99BB", "#ff88aa", "#EE7799", "#CC5577", "#663344"],
"Burgundy" : ["#991133", "#880022", "#770011", "#550000", "#330011"],
"Blush" : ["#EE6688", "#dd5577", "#CC4466", "#AA2244", "#552233"],
"Wild Watermelon" : ["#FF6688", "#ff5577", "#EE4466", "#CC2244", "#662233"],
"Amaranth" : ["#FF4466", "#ee3355", "#DD2244", "#BB0022", "#552222"],
"Mauvelous" : ["#FFAABB", "#ff99aa", "#EE8899", "#CC6677", "#664444"],
"Alizarin Crimson" : ["#FF3344", "#ee2233", "#DD1122", "#BB0000", "#551122"]

},

    change : function(color) {
      var head = document.getElementsByTagName('HEAD')[0],
          style = document.getElementById('fa_theme_style');

      my_setcookie('fa_theme_color', color, true);

      if (color != 'Selecionar um tema' && color != 'Tema Personalizado') {
        fa_theme_color.selected = color == 'Tema Aleatório' ? fa_theme_color.palette['Tema Aleatório'][Math.floor(Math.random() * fa_theme_color.palette['Tema Aleatório'].length)] : color;
        fa_theme_color.selector.style.backgroundColor = fa_theme_color.palette[fa_theme_color.selected][1];
        fa_theme_color.selector.style.borderColor = fa_theme_color.palette[fa_theme_color.selected][2];
        fa_theme_color.selector.firstChild.innerHTML = 'Tema Padrão';

        if (style) head.removeChild(style);
        fa_theme_color.picker.style.display = 'none';

        $(head).append('<style type="text/css" id="fa_theme_style">' + fa_theme_color.css() + '</style>');

      } else if (color == 'Tema Personalizado') {
        fa_theme_color.selected = 'Tema Personalizado';

        if (style) {
          head.removeChild(style);
        }

        var val = fa_theme_color.picker.value.toUpperCase();
        my_setcookie('fae_custom-theme', val, true);

        fa_theme_color.picker.style.display = '';
        fa_theme_color.selector.style.backgroundColor = val;
        fa_theme_color.selector.style.borderColor = fae_editColor(val, -1);

        window.fa_theme_color.palette['Tema Personalizado'] = [
          fae_editColor(val, +1),
          val,
          fae_editColor(val, -1),
          fae_editColor(val, -3),
          fae_editColor(val, 'darken')
        ];

        $(head).append('<style type="text/css" id="fa_theme_style">' + fa_theme_color.css() + '</style>');

      } else {
        if (style) {
          head.removeChild(style);
        }

        fa_theme_color.picker.style.display = 'none';

        fa_theme_color.selector.style.backgroundColor = '#999';
        fa_theme_color.selector.style.borderColor = '#888';
        fa_theme_color.selector.firstChild.innerHTML = 'Selecionar um tema';
      }
    },

    css : function() {
      var palette = fa_theme_color.palette[fa_theme_color.selected];
      return '.color-primary, .title, h2.u, .h3, .inner h1.page-title, .mainmenu:after, .forumline tbody .catHead, form.search-form input.search-keywords, input.search-button, .pagination span a, a.button1, a.button2, button.button2, input.button1, input.button2, input.button, #profile-advanced-add a, img[src*="?poll"], .fa_pseudo_radio:after, #tabs, body div.sceditor-dropdown .button, .codebox dt, blockquote cite, .sceditor-container .sceditor-toolbar, body #fa_toolbar, body #fa_toolbar_hidden, body #fa_toolbar #fa_right #notif_list li.see_all, #fae_sticky_nav_panel a:after, img[src*="color=primary"], .table1 thead th, .breadcrumbs, input[type="button"], input[type="submit"], input[type="reset"], input[type="file"], .forumbg li.header, #chatbox_header, body #chatbox_footer { background-color:' + palette[1] + '; }'+
             '#cp-main h1:not(.title) { background-color:' + palette[1] + '; }'+
             '.pagination span a:hover, a.button1:hover, a.button2:hover, button.button2:hover, input.button1:hover, input.button2:hover, input.button:hover, #profile-advanced-add a:hover, input.search-button:hover, body div.sceditor-dropdown .button:hover, img[src*="color=primary"]:hover, input[type="button"]:hover, input[type="submit"]:hover, input[type="reset"]:hover, input[type="file"]:hover { background-color:' + palette[2] + '; }'+
             '.pagination span a:active, .pagination span a:focus, .pagination span strong, a.button1:active, a.button2:active, button.button2:active, input.button1:active, input.button2:active, input.button:active, input[type="button"]:active, input[type="submit"]:active, input[type="reset"]:active, input[type="file"]:active, a.button1:focus, a.button2:focus, button.button2:focus, input.button1:focus, input.button2:focus, input.button:focus, input.search-button:focus, #tabs a:after, body div.sceditor-dropdown .button:active, body div.sceditor-dropdown .button:focus, body #fa_search #fa_textarea, body #fa_search #fa_magnifier, img[src*="color=primary"]:active, input[type="button"]:focus, input[type="submit"]:focus, input[type="reset"]:focus, input[type="file"]:focus { background-color:' + palette[3] + '; }'+
             '.fa_pseudo_checkbox:after, h2.post-content, h3.post-content, h4.post-content, .codebox .fae_copy-code:before { color:' + palette[1] + '; }'+
             'img[src*="?poll"], .sceditor-container .sceditor-toolbar, .sceditor-container .sceditor-group, body #fa_toolbar, body #fa_toolbar_hidden { border-color:' + palette[2] + '; }'+
             '.color-secondary, .forum-status[style*="locked=true"], img[src*="color=secondary"] { background-color:' + palette[4] + '; }'+
             '.forum-status[style*="state=new"] { background-color:' + palette[0] + '; }'+
             'form.search-form { background-color:' + palette[2] + '; }'+
             'form.search-form input.search-keywords, input.search-button { border-color:' + palette[0] + '!important; }'+
             'input[type="text"]:hover, input.post:hover, input.inputbox:hover, textarea:hover, select:hover, input[type="text"]:focus, input.post:focus, input.inputbox:focus, textarea:focus, select:focus, body div.sceditor-dropdown input:focus, body div.sceditor-dropdown textarea:focus, .fa_pseudo_checkbox:hover, .fa_pseudo_radio:hover, .sceditor-container, h2.post-content, h3.post-content, h4.post-content, .lastpost-avatar, #wio_new_avatar, .avatar-mini img, .avatar, #chatbox, #chatbox_members, #chatbox_members > h4.away, #chatbox_members > ul.away-users, body #chatbox .cb-avatar { border-color:' + palette[1] + ' !important; }'+
             'a, a:link, a:visited { color:' + palette[3] + '; }'+
             'a:hover, a:active { color:' + palette[2] + '; }'+
             '::selection { background-color:' + palette[1] + '; } ::-moz-selection { background-color:' + palette[1] + '; }'+
             '::-webkit-scrollbar-thumb, ::-webkit-scrollbar-button:single-button { background-color:' + palette[1] + '; }'+
             '::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-button:single-button:hover { background-color:' + palette[2] + '; }'+
             '::-webkit-scrollbar-thumb:active, ::-webkit-scrollbar-button:single-button:active { background-color:' + palette[3] + '; }';
    }
  };

  var selector = document.createElement('SELECT'),
      picker = document.createElement('INPUT'),
      frag = document.createDocumentFragment(),
      opt,
      color,
      i;

  if (!fa_theme_color.palette[fa_theme_color.selected]) {
    for (i in fa_theme_color.palette) {
      fa_theme_color.selected = i;
      my_setcookie('fa_theme_color', i, true);
      break;
    }
  }

  selector.id = 'fa_theme_selector';
  selector.onchange = function() {
    fa_theme_color.change(this.value);
  };

  picker.id = 'fae_custom-theme';

  try {
    picker.type = 'color';
  } catch (error) {
    picker.type = 'text';
  }

  picker.value = cc || '#6699CC';
  picker.style.display = my_getcookie('fae_custom-theme') ? '' : 'none';
  picker.onchange = function () {
    fa_theme_color.change('Tema Personalizado');
  };

  for (i in fa_theme_color.palette) {
    opt = document.createElement('OPTION');
    color = /Tema Aleatório|Selecionar um tema|Tema Personalizado/.test(i) ? ['#FFF', '#000'] : [fa_theme_color.palette[i][2], ''];

    if (!/Tema Aleatório|Selecionar um tema|Tema Personalizado/.test(i)) {
      fa_theme_color.palette['Tema Aleatório'][fa_theme_color.palette['Tema Aleatório'].length] = i;
    }

    opt.value = i;
    opt.innerHTML = i;
    opt.selected = fa_theme_color.selected == i ? true : false;
    opt.style.backgroundColor = color[0];
    opt.style.color = color[1];

    frag.appendChild(opt);
  }

  selector.appendChild(frag);

  document.write('<style type="text/css">#fa_theme_selector { color:#FFF; border:1px solid transparent; float:left; outline:none; } #fae_custom-theme { margin:3px; float:left; }</style>');

  fa_theme_color.selector = selector;
  fa_theme_color.picker = picker;
  fa_theme_color.change(fa_theme_color.selected);

  $(function() {
    var body = document.getElementById('page-body');
    body.insertBefore(picker, body.firstChild);
    body.insertBefore(selector, body.firstChild);

    /* THEME CHANGER UI */
    if (fa_theme_color.selector) {
      var frag = document.createDocumentFragment();

      // create the theme picker
      window.fae_theme_picker = document.createElement('A');
      fae_theme_picker.href = '#';
      fae_theme_picker.dataset.selectedIndex = fa_theme_color.selector.selectedIndex;
      fae_theme_picker.innerHTML = fa_theme_color.selector.options[fa_theme_color.selector.selectedIndex].innerHTML;
      fae_theme_picker.style.width = fa_theme_color.selector.getBoundingClientRect().width - 12 + 'px';
      fae_theme_picker.style.backgroundColor = fa_theme_color.selector.style.backgroundColor;
      fae_theme_picker.style.borderColor = fa_theme_color.selector.style.borderColor;
      fae_theme_picker.id = 'fae_theme_picker';
      fae_theme_picker.onclick = function () {
        return false;
      };

      // show / hide the theme picker on click
      document.addEventListener('click', function (e) {
        var that = e.target;

        if (that.id == 'fae_theme_picker') {

          if (fae_theme_list.className == 'theme_list_hidden') {
            var offset = that.getBoundingClientRect(),
                selected = fae_theme_list.querySelector('[data-index="' + fae_theme_picker.dataset.selectedIndex + '"]');

            fae_theme_list.className = '';
            fae_theme_list.style.left = offset.left + 'px';
            fae_theme_list.style.marginTop = offset.height + 1 + 'px';

            fae_hover_theme(selected);
            fae_theme_list.scrollTop = (selected.offsetTop - fae_theme_list.getBoundingClientRect().height) + (selected.getBoundingClientRect().height + 2);

          } else {
            fae_theme_list.className = 'theme_list_hidden';
          }

        } else if (!fae_theme_list.className) {
          fae_theme_list.className = 'theme_list_hidden';
        }
      });

      // change the theme when the up or down arrows are pressed
      fae_theme_picker.onkeydown = function (e) {
        var index = +fae_theme_picker.dataset.selectedIndex;
            next = fae_theme_list.querySelector('[data-index="' + (e.keyCode == 38 ? index - 1 : e.keyCode == 40 ? index + 1 : index) + '"]');

        if (next && next.className != 'pseudo-hover') {
          next.click();
          fae_hover_theme(next);
        }

        return false;
      };

      // hover the selected option / last hovered option
      window.fae_hover_theme = function (that) {
        var hovered = document.querySelector('.pseudo-hover');

        if (hovered) {
          hovered.className = '';
        }

        that.className = 'pseudo-hover';
      };

      // change the theme picker style when the custom theme is changed
      document.getElementById('fae_custom-theme').addEventListener('change', function () {
        fae_theme_picker.style.backgroundColor = fa_theme_color.selector.style.backgroundColor;
        fae_theme_picker.style.borderColor = fa_theme_color.selector.style.borderColor;
      });


      // create the theme list
      window.fae_theme_list = document.createElement('DIV');
      fae_theme_list.id = 'fae_theme_list';
      fae_theme_list.className = 'theme_list_hidden';
      fae_theme_list.style.width = fa_theme_color.selector.getBoundingClientRect().width + 'px';

      // prevent unwanted window scrolling when the theme list has been scrolled all the way from the top or bottom
      fae_theme_list.onwheel = function (e) {
        if ((fae_theme_list.scrollTop == (fae_theme_list.scrollHeight - fae_theme_list.clientHeight) && e.deltaY > 0) || fae_theme_list.scrollTop == 0 && e.deltaY < 0) {
          return false;
        }
      };

      // hide the theme list on scroll
      window.addEventListener('scroll', function () {
        if (!fae_theme_list.className) {
          fae_theme_list.className = 'theme_list_hidden';
        }
      });

      // get the original theme options and create new options for the updated UI
      for (var opts = fa_theme_color.selector.options, i = 0, j = opts.length, option; i < j; i++) {
        option = document.createElement('A');
        option.href = '#';
        option.dataset.index = i;
        option.innerHTML = opts[i].innerHTML;
        option.style.color = opts[i].style.color || '#FFF';
        option.style.backgroundColor = opts[i].style.backgroundColor;

        // apply the selected theme to both the new UI and hidden select element
        option.onclick = function () {
          var color = fa_theme_color.selector.options[this.dataset.index];

          color.selected = true;
          fae_theme_picker.innerHTML = fa_theme_color.selector.value;
          fae_theme_picker.dataset.selectedIndex = this.dataset.index;

          fa_theme_color.change(color.value);

          fae_theme_picker.style.backgroundColor = fa_theme_color.selector.style.backgroundColor;
          fae_theme_picker.style.borderColor = fa_theme_color.selector.style.borderColor;

          fae_theme_list.className = 'theme_list_hidden';
          fae_theme_picker.focus();

          return false;
        };

        // update selected option on hover
        option.onmouseover = function () {
          fae_hover_theme(this);
        };

        fae_theme_list.appendChild(option);
      }

      // add the theme picker, list, and style to the document
      frag.appendChild(fae_theme_picker);
      frag.appendChild(fae_theme_list);

      $('head').append(
        '<style type="text/css">'+
          '#footer_end #fae_theme_list,#page-footer #fae_theme_list{margin-top:-335px!important}'+
          'a#fae_theme_picker{color:#FFF;font-size:13px;font-family:Arial;background:#999;border:1px solid #888;position:relative;display:inline-block;padding:6px;margin:1px;float:left;text-decoration:none;outline:none;}'+
          '#fae_theme_picker:after{content:"\\f0dd";font-family:FontAwesome;position:absolute;right:4px}'+
          '#fae_theme_list{background:#FFF;border:1px solid rgba(0,0,0,.175);position:absolute;max-height:335px;overflow:auto;overflow-x:hidden;z-index:10;white-space:nowrap;visibility:visible}'+
          '#fae_theme_list.theme_list_hidden{visibility:hidden}'+
          '#fae_theme_list a{font-family:Arial;display:block;padding:6px;text-decoration:none}'+
          '#fae_theme_list a.pseudo-hover{color:#FFF!important;background:#28F!important}'+
          '@media (max-width: 768px) and (min-width: 0px) {body #fae_theme_picker{float:right;width:240px !important;margin:0 0 6px}body #fae_theme_list{width:252px !important}}'+
        '</style>'
      );

      fa_theme_color.selector.parentNode.insertBefore(frag, fa_theme_color.selector);
      fa_theme_color.selector.style.display = 'none'; // hide to original theme selector element
    }

  });
}());

function fae_editColor (str, op) {
  var letter = { 'F' : 15, 'E' : 14, 'D' : 13, 'C' : 12, 'B' : 11, 'A' : 10 },
      hex = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B', 'C', 'D', 'E', 'F'],
      neg = [0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6];

  str = str.toUpperCase().split('');

  for (var i = 1; i < 7; i++) {
    if (letter[str[i]]) {
      str[i] = letter[str[i]];
    } else {
      str[i] = +str[i];
    }

    if (op == 'darken') {
      str[i] = neg[str[i]];
    } else {
      str[i] += op;
    }

    if (str[i] > 15) {
      str[i] = 15;
    } else if (str[i] < 0) {
      str[i] = 0;
    }

    str[i] = hex[str[i]];
  }

  return str.join('');
};


/* -- 03. pseudoInputs -- */
// function to hide all checkboxes / radios and replace them with pseudo inputs
$(function() {
  for (var input = document.getElementsByTagName('INPUT'), i = 0, j = input.length, type; i < j; i++) {
    type = input[i].type;
    if (/radio|checkbox/i.test(type)) {
      input[i].className += ' fa_input_hidden';
      input[i].insertAdjacentHTML('afterend', '<span class="fa_pseudo_' + type + '" onclick="this.previousSibling.click(); return false;"/>');
    }
  }
});


/* -- 04. toolbar search mod -- */
// gives the search bar a placeholder and attaches an event handler to the button
window.fa_textarea_placeholer = 'Buscar...';

$(function(){
  $(function() {
    var fa_magnifier = document.getElementById('fa_magnifier'),
        fa_textarea = document.getElementById('fa_textarea');

    if (fa_magnifier) {
      fa_magnifier.onclick = function() {
        this.parentNode.submit();
      };
    }

    if (fa_textarea) {
      fa_textarea.value = fa_textarea_placeholer;

      fa_textarea.onfocus = function() {
        if (this.value == fa_textarea_placeholer) {
          this.value = '';
        }
      };

      fa_textarea.onblur = function() {
        if (!this.value) {
          this.value = fa_textarea_placeholer;
        }
      };

    }

  });
});


/* -- 05. fae_sticky_nav_panel -- */
// adds a sticky navigation for quick use when the navbar isn't visible
$(function() {
  window.fae_sticky = {
            // various user options
            navbar : 'navbar',
          position : 'right',
             title : 'Navegação Rápida',
           tooltip : 'Alternar Navegação Rápida',
    additionalHTML : '<div class="nav-actions"><a href="javascript:fae_sticky.copyURL();" title="Copiar BBCode URL"><i class="fa fa-link"></i></a>' + ( _userdata.user_level == 1 ? '<a href="/admin" title="Painel Admin"><i class="fa fa-wrench"></i></a>' : '' ) + '<a href="#top" title="Início da Página"><i class="fa fa-chevron-up"></i></a><a href="#bottom" title="Fim da Página"><i class="fa fa-chevron-down"></i></a></div>',
     alwaysVisible : false,

    // copy page URL as bbcode
    copyURL : function() {
      window.prompt('Copiar o BBCode URL abaixo. (CTRL+C)', '[url=' + window.location + ']' + document.title + '[/url]');
    },

    // listen for changes in the navbar's bottom rect
    scroll : function() {
      var rect = fae_sticky.navbar.getBoundingClientRect(),
          position = fae_sticky.node[0].style[fae_sticky.position];

      if (rect.bottom <= fae_sticky.offset[fae_sticky.tb_state] && position == '-30px') {
        fae_sticky.node[0].style[fae_sticky.position] = '';
      } else if (rect.bottom > fae_sticky.offset[fae_sticky.tb_state] && position != '-30px') {
        fae_sticky.node[0].style[fae_sticky.position] = '-30px';
        $(fae_sticky.node).removeClass('active');
      }
    },

    // offsets for when the toolbar is hidden / shown
    offset : {
      fa_hide : 0,
      fa_show : 30
    }
  };

  // nodes used in the module
  fae_sticky.node = [
    // button
    $('<a class="widget_menu column_button_' + fae_sticky.position + ' color-secondary" />').attr({
       href : '#',
         id : 'fa_sticky_nav_button',
      style : fae_sticky.position + ':-30px;',
      title : fae_sticky.tooltip

    }).click(function() {
      $(fae_sticky.node)[/active/.test(this.className) ? 'removeClass' : 'addClass']('active');
      return false;
    })[0],

    // panel
    $('<div id="fae_sticky_nav_panel" class="module_column column_' + fae_sticky.position + ' color-secondary" />')
    .html('<div class="title module_column_title">' + fae_sticky.title + '</div><div class="module_inner"></div>')[0]
  ];

  fae_sticky.navbar = document.getElementById(fae_sticky.navbar); // get the old navbar

  // then clone its contents and add it to the sticky panel
  $('.module_inner', fae_sticky.node[1]).append($('a.mainmenu', fae_sticky.navbar).clone()).append(fae_sticky.additionalHTML);
  $(document.body).append(fae_sticky.node);

  if (!fae_sticky.alwaysVisible) {
    fae_sticky.tb_state = my_getcookie('toolbar_state') || (_userdata.activate_toolbar ? 'fa_show' : 'fa_hide');
    fae_sticky.scroll();

    $(window).scroll(fae_sticky.scroll);

    $(function() {
      $('#fa_hide, #fa_show').click(function() {
        fae_sticky.tb_state = this.id;
      });
    });
  } else {
    fae_sticky.node[0].style[fae_sticky.position] = '';
  }
});


/* -- 06. image resizer -- */
(function() {
  window.fa_img_resizer = {
    max_width : 400, // maximum image width (400px)
    max_height : 250, // maximum image height (250px)

    selector : '.postbody .content img, .mod_news img, .message-text img', // where images should be resized

    options : {
            bar : true, // resized image options bar
        toggler : true, // Enlarge / Reduce Image
      full_size : true, // Mostrar tamanho grande
       download : false, // Baixar imagem link
       lightbox : true // lightbox effect
    },

    // texts
    lang : {
      full_size : '<i class="fa fa-external-link"></i> Mostrar tamanho grande',
        enlarge : '<i class="fa fa-search-plus"></i> Aumentar imagem',
         reduce : '<i class="fa fa-search-minus"></i> Reduzir imagem',
       download : '<i class="fa fa-download"></i> Baixar imagem',
       tooltip : 'Clique para ver imagem completa'
    },

    // resize all images inside the "resizeIn" elements
    resize : function() {
      for (var a = $(fa_img_resizer.selector), i = 0, j = a.length; i < j; i++) {
        if (!a[i].alt && (a[i].naturalWidth > fa_img_resizer.max_width || a[i].naturalHeight > fa_img_resizer.max_height)) {
          a[i].className += ' fa_img_reduced';

          // make the image a "link" if it's not wrapper with one
          if (fa_img_resizer.options.lightbox && a[i].parentNode.tagName != 'A') {
            a[i].style.cursor = 'pointer';
            a[i].title = fa_img_resizer.lang.tooltip;

            a[i].onclick = function() {
              fa_img_resizer.lightbox(this);
            };
          }

          // create the resize bar
          if (fa_img_resizer.options.bar) {
            (a[i].parentNode.tagName == 'A' ? a[i].parentNode : a[i]).insertAdjacentHTML('beforebegin',
              '<div class="fa_img_resizer" style="width:' + (a[i].width -  + 'px;">'+
                (fa_img_resizer.options.toggler ? '<a class="fa_img_enlarge" href="#" onclick="fa_img_resizer.toggle(this); return false;">' + fa_img_resizer.lang.enlarge + '</a>' : '')+
                (fa_img_resizer.options.full_size ? '<a class="fa_img_full" href="/viewimage.forum?u=' + a[i].src + '" target="_blank">' + fa_img_resizer.lang.full_size + '</a>' : '')+
                (fa_img_resizer.options.download && !/Firefox/.test(navigator.userAgent) && 'download' in document.createElement('A') ? '<a class="fa_img_download" href="' + a[i].src + '" target="_blank" download>' + fa_img_resizer.lang.download + '</a>' : '' )+
              '</div>'
            );
          }
        }
      }
    },

    // toggle between enlarged and reduced image sizes
    toggle : function(that) {
      var img = that.parentNode.nextSibling;

      if (img.tagName == 'A') {
        img = img.getElementsByTagName('IMG')[0];
      }

      if (/fa_img_reduced/.test(img.className)) {
        that.innerHTML = fa_img_resizer.lang.reduce;
        that.className = 'fa_img_reduce';
        img.className = img.className.replace(/fa_img_reduced/, 'fa_img_enlarged');
      } else {
        that.innerHTML = fa_img_resizer.lang.enlarge;
        that.className = 'fa_img_enlarge';
        img.className = img.className.replace(/fa_img_enlarged/, 'fa_img_reduced');
      }

      that.parentNode.style.width = img.width - 8 + 'px';
    },

    // lightbox effect
    lightbox : function(that) {
      var frag = document.createDocumentFragment(),
          overlay = $('<div id="fa_img_lb_overlay" />')[0],
          img = $('<img id="fa_img_lb_image" src="' + that.src + '" />')[0];

      overlay.onclick = fa_img_resizer.kill_lightbox;
      img.onclick = fa_img_resizer.kill_lightbox;

      frag.appendChild(overlay);
      frag.appendChild(img);
      document.body.appendChild(frag);
      document.body.style.overflow = 'hidden';

      img.style.marginTop = '-' + (img.height / 2) + 'px';
      img.style.marginLeft = '-' + (img.width / 2) + 'px';
    },

    // kill the lightbox
    kill_lightbox : function() {
      var overlay = document.getElementById('fa_img_lb_overlay'),
          img = document.getElementById('fa_img_lb_image');

      overlay && document.body.removeChild(overlay);
      img && document.body.removeChild(img);
      document.body.style.overflow = '';
    }
  };

  // write styles into the document head
  document.write(
    '<style type="text/css">'+
      fa_img_resizer.selector + ', .fa_img_reduced { max-width:' + fa_img_resizer.max_width + 'px; max-height:' + fa_img_resizer.max_height + 'px; }'+
      '.fa_img_enlarged { max-width:100% !important; max-height:100% !important; }'+
      '.fa_img_resizer { font-size:12px; text-align:left; padding:3px; margin:3px 0; background:#FFF; border:1px solid #CCC; }'+
      '.fa_img_resizer a { display:inline-block; margin:0 3px; }'+
      '.fa_img_resizer i { font-size:14px; vertical-align:middle; }'+
      '#fa_img_lb_overlay { background:rgba(0, 0, 0, 0.7); position:fixed; top:0; right:0; bottom:0; left:0; z-index:999999; cursor:pointer; }'+
      '#fa_img_lb_image { max-height:100%; max-width:100%; position:fixed; left:50%; top:50%; z-index:9999999; cursor:pointer; }'+
    '</style>'
  );

  // begin modifying images when the page is loaded
  $(window).load(fa_img_resizer.resize);

  // kill forumactif's image resizer
  if (window.resize_images) {
    window.resize_images = function() {
      return false;
    };
  }
}());


/* -- 07. fae_toggle_category -- */
function fae_toggle_category(that) {
  var next = that.nextSibling;
  that.className = 'title ';

  if (next.style.display == 'none') {
    next.style.display = '';
    that.className += 'c_hide';
    my_setcookie('fae_' + next.id, 'shown');
  } else {
    next.style.display = 'none';
    that.className += 'c_show';
    my_setcookie('fae_' + next.id, 'hidden');
  }
};


/* -- 08. sticky_nav_notifications -- */
$(function() {
  if (_userdata.session_logged_in) {
    var nav = document.getElementById('fae_sticky_nav_panel'),
        a = $('<a class="mainmenu" href="/profile?mode=editprofile&page_profil=notifications">Notificações</a>')[0];

    if (nav) {
      $('a[href="/privmsg?folder=inbox"]', nav).after(a);

      $.get('/notification.forum', function(o) {
        if (o && o.unread) {
          a.insertAdjacentHTML('beforeend', ' <span id="sticky_notif_unread">(' + o.unread + ')</span>');
        }
      }, 'json');
    }
  }
});


/* -- 09. update_notifier -- */
$(function() {
  if (_userdata.user_id == 1 && !my_getcookie('fae_update_alerted')) {

    $.get('https://raw.githubusercontent.com/SethClydesdale/forumactif-edge/master/javascripts/version-data.js', function(d) {
      var script = document.createElement('SCRIPT');
      script.type = 'text/javascript';
      script.text = d.replace(/forumactif_edge_version_data/, 'fae_github_version_data');
      document.body.appendChild(script);

      if (forumactif_edge_version_data.length < fae_github_version_data.length) {
        alert('An update has been found for Forumactif Edge. When you\'re ready, please proceed to your FAE Control Panel and click "Check for updates" to begin the update process.');
      }

      my_setcookie('fae_update_alerted', '1');
    });

  }
});


/* -- 10. topic_icon_formatter -- */
$(function() {
  var a = $('.forum-info[style*="background-image"]'),
      i = 0,
      j = a.length;

  if (j) {
    for (; i < j; i++) {
      a[i].insertAdjacentHTML('afterbegin', '<img class="topic-icon" src="' + a[i].style.backgroundImage.replace(/.*?url\((.*?)\).*/, '$1').replace(/'|"/g, '') + '" />');
      a[i].style.backgroundImage = '';
    }

    $('head').append('<style type="text/css">.topic-icon{vertical-align:middle;margin:0 3px;}</style>');
  }
});


/* -- 11. dark mode -- */
(function() {
  window.fae_lightSwitchMode = my_getcookie('fae_light-switch-mode') || 'dark';

  document.write('<style type="text/css">#fae_light-switch-container{margin:6px 0}#fae_light-switch-label{font-weight:700;vertical-align:middle}#fae_light-switch{background-color:rgba(0,0,0,.25);vertical-align:middle;display:inline-block;position:relative;height:26px;width:56px;border-radius:20px;cursor:pointer;overflow:hidden}#fae_light-switch>input{display:none}#fae_light-switch>div{background-color:rgba(255,255,255,.5);position:absolute;top:3px;left:3px;height:20px;width:20px;border-radius:20px;transition:.4s;font-size:13px;font-weight:700;line-height:22px}#fae_light-switch>div:before{content:"ON";margin-left:-24px;color:transparent;transition:.4s}#fae_light-switch>div:after{content:"OFF";margin-left:30px;color:rgba(255,255,255,.5);transition:.4s}#fae_light-switch>input:checked+div{background-color:#FFF;left:33px}#fae_light-switch>input:checked+div:before{color:#FFF}#fae_light-switch>input:checked+div:after{color:transparent}</style>');

  var footer = '.footer-links.left',

      cookie = my_getcookie('fae_light-switch'),
      rgb,
      button,
      container,

      changeTheme = function (cookie) {
        var button = document.querySelector('#fae_light-switch input');

        if ((button && button.checked) || cookie == 'on') {
          my_setcookie('fae_light-switch', 'on', true);

          if (window.sessionStorage && window.sessionStorage.faeLightSwitch) {
            $('head').append('<style type="text/css" id="fae_light-switch-css">' + window.sessionStorage.faeLightSwitch + '</style>');
          } else {
            $.get('https://raw.githubusercontent.com/SethClydesdale/forumactif-edge/master/css/dark-mode/' + fae_lightSwitchMode + '-mode.min.css', function (d) {
              $('head').append('<style type="text/css" id="fae_light-switch-css">' + d + '</style>');

              if (window.sessionStorage) {
                window.sessionStorage.faeLightSwitch = d;
              }
            });
          }

        } else {
          var css = document.getElementById('fae_light-switch-css');

          my_setcookie('fae_light-switch', 'off', true);

          if (css) {
            document.head.removeChild(css);
          }
        }
      };

  cookie && changeTheme(cookie);

  $(function() {
    if (!my_getcookie('fae_light-switch-mode')) {
      rgb = window.getComputedStyle(document.body, null).getPropertyValue('background-color').replace(/rgb\(|\)|\s/g, '').split(',');
      fae_lightSwitchMode = Math.round(((parseInt(rgb[0]) * 299) + (parseInt(rgb[1]) * 587) + (parseInt(rgb[2]) * 114)) /1000) > 125 ? 'dark' : 'light';

      my_setcookie('fae_light-switch-mode', fae_lightSwitchMode, true);
    }

    footer = document.querySelector(footer);

    if (footer) {
      button = document.createElement('LABEL');
      button.id = 'fae_light-switch';
      button.innerHTML = '<input type="checkbox" ' + (cookie == 'on' ? 'checked="true"' : '') + '/><div></div>';
      button.firstChild.onchange = changeTheme;

      container = document.createElement('DIV');
      container.id = 'fae_light-switch-container';
      container.innerHTML = '<span id="fae_light-switch-label">' + (fae_lightSwitchMode == 'dark' ? 'Modo Escuro:' : 'Modo Claro:') + '</span>';

      container.appendChild(button);
      footer.appendChild(container);
    }
  });
}());


/* -- 12. copy code button -- */
$.getScript('https://cdn.jsdelivr.net/clipboard.js/1.5.16/clipboard.min.js', function() {
  window.fae_copyCode = {
    copy : 'Copiar Código',
    copied : 'Copiado!'
  };

  $(function() {
    var a = $('.codebox dt').not('.spoiler > dt, .hidecode > dt'),
        i = 0,
        j = a.length;

    if (a[0]) {
      $('head').append('<style type="text/css">.fae_copy-code{float:right;cursor:pointer}.fae_copy-code:before{content:"\\f0ea";font-size:13px;font-family:FontAwesome;text-align:center;color:#69C;background:#FFF;border-radius:100%;display:inline-block;width:19px;height:19px;line-height:19px;margin:-1px 3px 0 3px}.codebox .fae_copy-code:hover:before{color:#EB5}.codebox .fae_copy-code.fae_copied:before{content:"\\f00c";font-weight:700;color:#8B5}</style>');

      for (; i < j; i++) {
        a[i].insertAdjacentHTML('beforeend', '<span class="fae_copy-code">' + fae_copyCode.copy + '</span>');
      }

      new Clipboard('.fae_copy-code',{
        target : function (copy) {
          if (copy.innerHTML != fae_copyCode.copied) {
            return $(copy).closest('.codebox').find('code')[0];
          }
        }
      }).on('success', function (e) {
        var copy = e.trigger;

        if (copy.innerHTML != fae_copyCode.copied) {
          copy.innerHTML = fae_copyCode.copied;
          copy.className += ' fae_copied';

          window.setTimeout(function() {
            copy.innerHTML = fae_copyCode.copy;
            copy.className = copy.className.replace('fae_copied', '');
          }, 1000);
        }

        e.clearSelection();
      });
    }

  });
});



/* -- 13. local frame styler -- */
// global function for getting local iframes
function fae_styleLocalFrames () {
  var frame = $('iframe[src^="/"], object[data^="/"]'),
      i = 0,
      j = frame.length;

  for (; i < j; i++) {
    try {
      var head = $('head', frame[i].contentDocument || frame[i].contentWindow.document);

      $('#fa_theme_style, #fae_light-switch-css', head).remove();
      head.append($('#fa_theme_style, #fae_light-switch-css').clone());

    } catch (error) {
      window.console && console.log(error);
    }
  }

};


// waits for frames to load (such as chatbox and smilies) and then applies preferred styles to them
$(window).load(function() {
  fae_styleLocalFrames();
  $('iframe[src^="/"]').on('load', fae_styleLocalFrames);
  $('object[data^="/"]').attr('onload', 'fae_styleLocalFrames();');
  $('#fae_custom-theme, #fa_theme_selector, #fae_light-switch input').on('change', fae_styleLocalFrames);
});


Cordialmente,
pedxz.
Pedxz

Pedxz
Moderadeiro
Moderadeiro

Masculino
Inscrito dia : 13/01/2017
Mensagens : 2809
Pontos Ativos : 3561

Ver perfil do usuário https://pedxz.forumeiros.com

Atendido / Resolvido Re: Widgets no fórum

Mensagem por Ketholy em 21.12.18 11:47

@Pedxz escreveu:Olá @Ketholy,
Mude o script em cima para:
Código:
/******************************
** ======= FUNCTIONS ======= **
*******************************
** 00. fa_initForumModules (REMOVIDO)
** 01. fa_navactif
** 02. fa_theme_changer
** 03. pseudoInputs
** 04. toolbar search mod
** 05. fae_sticky_nav_panel
** 06. image resizer
** 07. fae_toggle_category
** 08. sticky_nav_notifications
** 09. update_notifier
** 10. topic_icon_formatter
** 11. dark mode
** 12. copy code button
** 13. local frame styler
******************************/

// IMPORTANT DATA (DO NOT DELETE)
if (!window.FAE) {
  window.FAE = new Object();
}

FAE.board_lang =  'Português';

/* -- 01. fa_navactif -- */
// finds the currently active navigation item and adds a classname to it.
function fa_navactif() {
  for (var cleanURI = window.location.href.replace(/\?.*|#.*/, ''), a = document.getElementById('page-header').getElementsByTagName('A'), i = 0, j = a.length; i < j; i++) {
    if (/mainmenu/.test(a[i].className) && cleanURI == a[i].href.replace(/\?.*|#.*/,'')) {
      a[i].className+=' fa_navactif';
      break;
    }
  }
  $('.mainmenu[href="/search"]').removeAttr('onclick');
};


/* -- 02. fa_theme_changer -- */
// theme selector for the forum
(function() {
  var cc = my_getcookie('fae_custom-theme');

  window.fa_theme_color = {
    selected : my_getcookie('fa_theme_color') || 'Selecionar um tema',

    palette : {
"Selecionar um tema" : [],
"Tema Personalizado" : [cc ? fae_editColor(cc, +1) : '#77AADD', cc || '#6699CC', cc ? fae_editColor(cc, -1) : '#5588BB', cc ? fae_editColor(cc, -3) : '#336699', cc ? fae_editColor(cc, 'darken') : '#334455'],
"Tema Aleatório" : [],
"Silver" : ["#DDDDDD", "#cccccc", "#BBBBBB", "#999999", "#555555"],
"Dusty Gray" : ["#AAAAAA", "#999999", "#888888", "#666666", "#444444"],
"Dove Gray" : ["#777777", "#666666", "#555555", "#333333", "#333333"],
"Mine Shaft" : ["#444444", "#333333", "#222222", "#000000", "#222222"],
"Persian Red" : ["#DD4444", "#cc3333", "#BB2222", "#990000", "#552222"],
"Christmas Red" : ["#CC3333", "#bb2222", "#AA1111", "#880000", "#441111"],
"Coral Red" : ["#FF5555", "#ff4444", "#EE3333", "#CC1111", "#662222"],
"Chestnut Rose" : ["#DD7777", "#cc6666", "#BB5555", "#993333", "#553333"],
"Eunry" : ["#DDAAAA", "#cc9999", "#BB8888", "#996666", "#554444"],
"Brandy Rose" : ["#CC9999", "#bb8888", "#AA7777", "#885555", "#443333"],
"Bazaar" : ["#AA8888", "#997777", "#886666", "#664444", "#443333"],
"Cinnabar" : ["#FF5544", "#ee4433", "#DD3322", "#BB1100", "#552222"],
"Crail" : ["#CC6655", "#bb5544", "#AA4433", "#882211", "#442222"],
"Flamingo" : ["#FF6644", "#ee5533", "#DD4422", "#BB2200", "#552222"],
"Red Damask" : ["#EE7755", "#dd6644", "#CC5533", "#AA3311", "#553322"],
"Tabasco" : ["#AA4422", "#993311", "#882200", "#660000", "#442211"],
"Paarl" : ["#BB6644", "#aa5533", "#994422", "#772200", "#442222"],
"Cape Palliser" : ["#BB7755", "#aa6644", "#995533", "#773311", "#443322"],
"Tuscany" : ["#DD7744", "#cc6633", "#BB5522", "#993300", "#553322"],
"Hot Cinnamon" : ["#EE7733", "#dd6622", "#CC5511", "#AA3300", "#553311"],
"Blaze Orange" : ["#FF7711", "#ff6600", "#EE5500", "#CC3300", "#663300"],
"Pumpkin" : ["#FF8822", "#ff7711", "#EE6600", "#CC4400", "#663311"],
"Antique Brass" : ["#DDAA77", "#cc9966", "#BB8855", "#996633", "#554433"],
"Raw Sienna" : ["#DD9955", "#cc8844", "#BB7733", "#995511", "#553322"],
"Earthtone" : ["#775533", "#664422", "#553311", "#331100", "#332211"],
"Americano" : ["#998877", "#887766", "#776655", "#554433", "#333333"],
"Coffee" : ["#887766", "#776655", "#665544", "#443322", "#333322"],
"Cinnamon" : ["#995511", "#884400", "#773300", "#551100", "#332200"],
"Brown" : ["#AA6611", "#995500", "#884400", "#662200", "#442200"],
"Sandy Tan" : ["#EECC99", "#ddbb88", "#CCAA77", "#AA8855", "#554433"],
"Hokey Pokey" : ["#DDAA44", "#cc9933", "#BB8822", "#996600", "#554422"],
"Sienna" : ["#776644", "#665533", "#554422", "#332200", "#332222"],
"Shadow" : ["#998866", "#887755", "#776644", "#554422", "#333322"],
"Buttercup" : ["#FFBB22", "#eeaa11", "#DD9900", "#BB7700", "#554411"],
"Tulip Tree" : ["#FFCC44", "#eebb33", "#DDAA22", "#BB8800", "#554422"],
"Golden Grass" : ["#EEBB33", "#ddaa22", "#CC9911", "#AA7700", "#554411"],
"Pizza" : ["#DDAA22", "#cc9911", "#BB8800", "#996600", "#554411"],
"Reef Gold" : ["#BB9933", "#aa8822", "#997711", "#775500", "#443311"],
"Olive" : ["#999911", "#888800", "#777700", "#555500", "#333300"],
"Camouflage" : ["#555522", "#444411", "#333300", "#111100", "#222211"],
"Avocado" : ["#999977", "#888866", "#777755", "#555533", "#333333"],
"Earls Green" : ["#DDDD44", "#cccc33", "#BBBB22", "#999900", "#555522"],
"Laser" : ["#DDDD77", "#cccc66", "#BBBB55", "#999933", "#555533"],
"Pine Glade" : ["#DDDDAA", "#cccc99", "#BBBB88", "#999966", "#555544"],
"Pea Green" : ["#88AA33", "#779922", "#668811", "#446600", "#334411"],
"Celery" : ["#AADD44", "#99cc33", "#88BB22", "#669900", "#445522"],
"Chartreuse" : ["#99EE11", "#88dd00", "#77CC00", "#55AA00", "#335500"],
"Forumactif Green" : ["#99DD44", "#88cc33", "#77BB22", "#559900", "#335522"],
"Dollar Bill" : ["#99CC66", "#88bb55", "#77AA44", "#558822", "#334422"],
"Wild Willow" : ["#AADD77", "#99cc66", "#88BB55", "#669933", "#445533"],
"Asparagus" : ["#88BB66", "#77aa55", "#669944", "#447722", "#334422"],
"Atlantis" : ["#77DD44", "#66cc33", "#55BB22", "#339900", "#335522"],
"Forest Green" : ["#339933", "#228822", "#117711", "#005500", "#113311"],
"Christmas Green" : ["#117711", "#006600", "#005500", "#003300", "#003300"],
"Apple" : ["#44DD44", "#33cc33", "#22BB22", "#009900", "#225522"],
"Mantis" : ["#77DD77", "#66cc66", "#55BB55", "#339933", "#335533"],
"De York" : ["#AADDAA", "#99cc99", "#88BB88", "#669966", "#445544"],
"Envy" : ["#99BB99", "#88aa88", "#779977", "#557755", "#334433"],
"Spruce" : ["#77DD88", "#66cc77", "#55BB66", "#339944", "#335533"],
"Bottle Green" : ["#22BB44", "#11aa33", "#009922", "#007700", "#114422"],
"Aqua Forest" : ["#77BB88", "#66aa77", "#559966", "#337744", "#334433"],
"Mountain Meadow" : ["#44DD77", "#33cc66", "#22BB55", "#009933", "#225533"],
"Meadow" : ["#33BB66", "#22aa55", "#119944", "#007722", "#114422"],
"Sea Green" : ["#449966", "#338855", "#227744", "#005522", "#223322"],
"Amazon" : ["#448866", "#337755", "#226644", "#004422", "#223322"],
"Emerald" : ["#77DDAA", "#66cc99", "#55BB88", "#339966", "#335544"],
"Shamrock" : ["#44DDAA", "#33cc99", "#22BB88", "#009966", "#225544"],
"Blue Lagoon" : ["#55CCBB", "#44bbaa", "#33AA99", "#118877", "#224444"],
"Turquoise" : ["#44DDDD", "#33cccc", "#22BBBB", "#009999", "#225555"],
"Downy" : ["#77DDDD", "#66cccc", "#55BBBB", "#339999", "#335555"],
"Sinbad" : ["#AADDDD", "#99cccc", "#88BBBB", "#669999", "#445555"],
"Teal" : ["#119999", "#008888", "#007777", "#005555", "#003333"],
"Blue Chill" : ["#2299AA", "#118899", "#007788", "#005566", "#113344"],
"Cerulean" : ["#11BBEE", "#00aadd", "#0099CC", "#0077AA", "#004455"],
"Deep Cerulean" : ["#1188BB", "#0077aa", "#006699", "#004477", "#003344"],
"Curious Blue" : ["#44AADD", "#3399cc", "#2288BB", "#006699", "#224455"],
"Slate Gray" : ["#8899AA", "#778899", "#667788", "#445566", "#333344"],
"Danube" : ["#77AADD", "#6699cc", "#5588BB", "#336699", "#334455"],
"Azure Radiance" : ["#1188FF", "#0077ff", "#0066EE", "#0044CC", "#003366"],
"Mariner" : ["#4477DD", "#3366cc", "#2255BB", "#003399", "#223355"],
"Azure" : ["#4466BB", "#3355aa", "#224499", "#002277", "#222244"],
"Governor Bay" : ["#4444DD", "#3333cc", "#2222BB", "#000099", "#222255"],
"Blue Marguerite" : ["#7777DD", "#6666cc", "#5555BB", "#333399", "#333355"],
"Blue Bell" : ["#AAAADD", "#9999cc", "#8888BB", "#666699", "#444455"],
"Comet" : ["#666688", "#555577", "#444466", "#222244", "#222233"],
"Purple Heart" : ["#7744DD", "#6633cc", "#5522BB", "#330099", "#332255"],
"Amethyst" : ["#AA77DD", "#9966cc", "#8855BB", "#663399", "#443355"],
"Amethyst Smoke" : ["#BBAACC", "#aa99bb", "#9988AA", "#776688", "#444444"],
"Mauve" : ["#EEBBFF", "#ddaaff", "#CC99EE", "#AA77CC", "#554466"],
"Affair" : ["#8855AA", "#774499", "#663388", "#441166", "#332244"],
"Purple" : ["#AA44DD", "#9933cc", "#8822BB", "#660099", "#442255"],
"Lavendar" : ["#CC88EE", "#bb77dd", "#AA66CC", "#8844AA", "#443355"],
"Cerise" : ["#DD44DD", "#cc33cc", "#BB22BB", "#990099", "#552255"],
"Fuchsia Pink" : ["#DD77DD", "#cc66cc", "#BB55BB", "#993399", "#553355"],
"Lilac" : ["#DDAADD", "#cc99cc", "#BB88BB", "#996699", "#554455"],
"Red Violet" : ["#DD44AA", "#cc3399", "#BB2288", "#990066", "#552244"],
"Disco" : ["#992266", "#881155", "#770044", "#550022", "#331122"],
"Carnation Pink" : ["#FFAADD", "#ff99cc", "#EE88BB", "#CC6699", "#664455"],
"Hopbush" : ["#DD77AA", "#cc6699", "#BB5588", "#993366", "#553344"],
"French Rose" : ["#FF5599", "#ee4488", "#DD3377", "#BB1155", "#552233"],
"Hibiscus" : ["#DD4477", "#cc3366", "#BB2255", "#990033", "#552233"],
"Claret" : ["#882244", "#771133", "#660022", "#440000", "#331122"],
"Bordeaux" : ["#771133", "#660022", "#550011", "#330000", "#330011"],
"Tickle Me Pink" : ["#FF99BB", "#ff88aa", "#EE7799", "#CC5577", "#663344"],
"Burgundy" : ["#991133", "#880022", "#770011", "#550000", "#330011"],
"Blush" : ["#EE6688", "#dd5577", "#CC4466", "#AA2244", "#552233"],
"Wild Watermelon" : ["#FF6688", "#ff5577", "#EE4466", "#CC2244", "#662233"],
"Amaranth" : ["#FF4466", "#ee3355", "#DD2244", "#BB0022", "#552222"],
"Mauvelous" : ["#FFAABB", "#ff99aa", "#EE8899", "#CC6677", "#664444"],
"Alizarin Crimson" : ["#FF3344", "#ee2233", "#DD1122", "#BB0000", "#551122"]

},

    change : function(color) {
      var head = document.getElementsByTagName('HEAD')[0],
          style = document.getElementById('fa_theme_style');

      my_setcookie('fa_theme_color', color, true);

      if (color != 'Selecionar um tema' && color != 'Tema Personalizado') {
        fa_theme_color.selected = color == 'Tema Aleatório' ? fa_theme_color.palette['Tema Aleatório'][Math.floor(Math.random() * fa_theme_color.palette['Tema Aleatório'].length)] : color;
        fa_theme_color.selector.style.backgroundColor = fa_theme_color.palette[fa_theme_color.selected][1];
        fa_theme_color.selector.style.borderColor = fa_theme_color.palette[fa_theme_color.selected][2];
        fa_theme_color.selector.firstChild.innerHTML = 'Tema Padrão';

        if (style) head.removeChild(style);
        fa_theme_color.picker.style.display = 'none';

        $(head).append('<style type="text/css" id="fa_theme_style">' + fa_theme_color.css() + '</style>');

      } else if (color == 'Tema Personalizado') {
        fa_theme_color.selected = 'Tema Personalizado';

        if (style) {
          head.removeChild(style);
        }

        var val = fa_theme_color.picker.value.toUpperCase();
        my_setcookie('fae_custom-theme', val, true);

        fa_theme_color.picker.style.display = '';
        fa_theme_color.selector.style.backgroundColor = val;
        fa_theme_color.selector.style.borderColor = fae_editColor(val, -1);

        window.fa_theme_color.palette['Tema Personalizado'] = [
          fae_editColor(val, +1),
          val,
          fae_editColor(val, -1),
          fae_editColor(val, -3),
          fae_editColor(val, 'darken')
        ];

        $(head).append('<style type="text/css" id="fa_theme_style">' + fa_theme_color.css() + '</style>');

      } else {
        if (style) {
          head.removeChild(style);
        }

        fa_theme_color.picker.style.display = 'none';

        fa_theme_color.selector.style.backgroundColor = '#999';
        fa_theme_color.selector.style.borderColor = '#888';
        fa_theme_color.selector.firstChild.innerHTML = 'Selecionar um tema';
      }
    },

    css : function() {
      var palette = fa_theme_color.palette[fa_theme_color.selected];
      return '.color-primary, .title, h2.u, .h3, .inner h1.page-title, .mainmenu:after, .forumline tbody .catHead, form.search-form input.search-keywords, input.search-button, .pagination span a, a.button1, a.button2, button.button2, input.button1, input.button2, input.button, #profile-advanced-add a, img[src*="?poll"], .fa_pseudo_radio:after, #tabs, body div.sceditor-dropdown .button, .codebox dt, blockquote cite, .sceditor-container .sceditor-toolbar, body #fa_toolbar, body #fa_toolbar_hidden, body #fa_toolbar #fa_right #notif_list li.see_all, #fae_sticky_nav_panel a:after, img[src*="color=primary"], .table1 thead th, .breadcrumbs, input[type="button"], input[type="submit"], input[type="reset"], input[type="file"], .forumbg li.header, #chatbox_header, body #chatbox_footer { background-color:' + palette[1] + '; }'+
             '#cp-main h1:not(.title) { background-color:' + palette[1] + '; }'+
             '.pagination span a:hover, a.button1:hover, a.button2:hover, button.button2:hover, input.button1:hover, input.button2:hover, input.button:hover, #profile-advanced-add a:hover, input.search-button:hover, body div.sceditor-dropdown .button:hover, img[src*="color=primary"]:hover, input[type="button"]:hover, input[type="submit"]:hover, input[type="reset"]:hover, input[type="file"]:hover { background-color:' + palette[2] + '; }'+
             '.pagination span a:active, .pagination span a:focus, .pagination span strong, a.button1:active, a.button2:active, button.button2:active, input.button1:active, input.button2:active, input.button:active, input[type="button"]:active, input[type="submit"]:active, input[type="reset"]:active, input[type="file"]:active, a.button1:focus, a.button2:focus, button.button2:focus, input.button1:focus, input.button2:focus, input.button:focus, input.search-button:focus, #tabs a:after, body div.sceditor-dropdown .button:active, body div.sceditor-dropdown .button:focus, body #fa_search #fa_textarea, body #fa_search #fa_magnifier, img[src*="color=primary"]:active, input[type="button"]:focus, input[type="submit"]:focus, input[type="reset"]:focus, input[type="file"]:focus { background-color:' + palette[3] + '; }'+
             '.fa_pseudo_checkbox:after, h2.post-content, h3.post-content, h4.post-content, .codebox .fae_copy-code:before { color:' + palette[1] + '; }'+
             'img[src*="?poll"], .sceditor-container .sceditor-toolbar, .sceditor-container .sceditor-group, body #fa_toolbar, body #fa_toolbar_hidden { border-color:' + palette[2] + '; }'+
             '.color-secondary, .forum-status[style*="locked=true"], img[src*="color=secondary"] { background-color:' + palette[4] + '; }'+
             '.forum-status[style*="state=new"] { background-color:' + palette[0] + '; }'+
             'form.search-form { background-color:' + palette[2] + '; }'+
             'form.search-form input.search-keywords, input.search-button { border-color:' + palette[0] + '!important; }'+
             'input[type="text"]:hover, input.post:hover, input.inputbox:hover, textarea:hover, select:hover, input[type="text"]:focus, input.post:focus, input.inputbox:focus, textarea:focus, select:focus, body div.sceditor-dropdown input:focus, body div.sceditor-dropdown textarea:focus, .fa_pseudo_checkbox:hover, .fa_pseudo_radio:hover, .sceditor-container, h2.post-content, h3.post-content, h4.post-content, .lastpost-avatar, #wio_new_avatar, .avatar-mini img, .avatar, #chatbox, #chatbox_members, #chatbox_members > h4.away, #chatbox_members > ul.away-users, body #chatbox .cb-avatar { border-color:' + palette[1] + ' !important; }'+
             'a, a:link, a:visited { color:' + palette[3] + '; }'+
             'a:hover, a:active { color:' + palette[2] + '; }'+
             '::selection { background-color:' + palette[1] + '; } ::-moz-selection { background-color:' + palette[1] + '; }'+
             '::-webkit-scrollbar-thumb, ::-webkit-scrollbar-button:single-button { background-color:' + palette[1] + '; }'+
             '::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-button:single-button:hover { background-color:' + palette[2] + '; }'+
             '::-webkit-scrollbar-thumb:active, ::-webkit-scrollbar-button:single-button:active { background-color:' + palette[3] + '; }';
    }
  };

  var selector = document.createElement('SELECT'),
      picker = document.createElement('INPUT'),
      frag = document.createDocumentFragment(),
      opt,
      color,
      i;

  if (!fa_theme_color.palette[fa_theme_color.selected]) {
    for (i in fa_theme_color.palette) {
      fa_theme_color.selected = i;
      my_setcookie('fa_theme_color', i, true);
      break;
    }
  }

  selector.id = 'fa_theme_selector';
  selector.onchange = function() {
    fa_theme_color.change(this.value);
  };

  picker.id = 'fae_custom-theme';

  try {
    picker.type = 'color';
  } catch (error) {
    picker.type = 'text';
  }

  picker.value = cc || '#6699CC';
  picker.style.display = my_getcookie('fae_custom-theme') ? '' : 'none';
  picker.onchange = function () {
    fa_theme_color.change('Tema Personalizado');
  };

  for (i in fa_theme_color.palette) {
    opt = document.createElement('OPTION');
    color = /Tema Aleatório|Selecionar um tema|Tema Personalizado/.test(i) ? ['#FFF', '#000'] : [fa_theme_color.palette[i][2], ''];

    if (!/Tema Aleatório|Selecionar um tema|Tema Personalizado/.test(i)) {
      fa_theme_color.palette['Tema Aleatório'][fa_theme_color.palette['Tema Aleatório'].length] = i;
    }

    opt.value = i;
    opt.innerHTML = i;
    opt.selected = fa_theme_color.selected == i ? true : false;
    opt.style.backgroundColor = color[0];
    opt.style.color = color[1];

    frag.appendChild(opt);
  }

  selector.appendChild(frag);

  document.write('<style type="text/css">#fa_theme_selector { color:#FFF; border:1px solid transparent; float:left; outline:none; } #fae_custom-theme { margin:3px; float:left; }</style>');

  fa_theme_color.selector = selector;
  fa_theme_color.picker = picker;
  fa_theme_color.change(fa_theme_color.selected);

  $(function() {
    var body = document.getElementById('page-body');
    body.insertBefore(picker, body.firstChild);
    body.insertBefore(selector, body.firstChild);

    /* THEME CHANGER UI */
    if (fa_theme_color.selector) {
      var frag = document.createDocumentFragment();

      // create the theme picker
      window.fae_theme_picker = document.createElement('A');
      fae_theme_picker.href = '#';
      fae_theme_picker.dataset.selectedIndex = fa_theme_color.selector.selectedIndex;
      fae_theme_picker.innerHTML = fa_theme_color.selector.options[fa_theme_color.selector.selectedIndex].innerHTML;
      fae_theme_picker.style.width = fa_theme_color.selector.getBoundingClientRect().width - 12 + 'px';
      fae_theme_picker.style.backgroundColor = fa_theme_color.selector.style.backgroundColor;
      fae_theme_picker.style.borderColor = fa_theme_color.selector.style.borderColor;
      fae_theme_picker.id = 'fae_theme_picker';
      fae_theme_picker.onclick = function () {
        return false;
      };

      // show / hide the theme picker on click
      document.addEventListener('click', function (e) {
        var that = e.target;

        if (that.id == 'fae_theme_picker') {

          if (fae_theme_list.className == 'theme_list_hidden') {
            var offset = that.getBoundingClientRect(),
                selected = fae_theme_list.querySelector('[data-index="' + fae_theme_picker.dataset.selectedIndex + '"]');

            fae_theme_list.className = '';
            fae_theme_list.style.left = offset.left + 'px';
            fae_theme_list.style.marginTop = offset.height + 1 + 'px';

            fae_hover_theme(selected);
            fae_theme_list.scrollTop = (selected.offsetTop - fae_theme_list.getBoundingClientRect().height) + (selected.getBoundingClientRect().height + 2);

          } else {
            fae_theme_list.className = 'theme_list_hidden';
          }

        } else if (!fae_theme_list.className) {
          fae_theme_list.className = 'theme_list_hidden';
        }
      });

      // change the theme when the up or down arrows are pressed
      fae_theme_picker.onkeydown = function (e) {
        var index = +fae_theme_picker.dataset.selectedIndex;
            next = fae_theme_list.querySelector('[data-index="' + (e.keyCode == 38 ? index - 1 : e.keyCode == 40 ? index + 1 : index) + '"]');

        if (next && next.className != 'pseudo-hover') {
          next.click();
          fae_hover_theme(next);
        }

        return false;
      };

      // hover the selected option / last hovered option
      window.fae_hover_theme = function (that) {
        var hovered = document.querySelector('.pseudo-hover');

        if (hovered) {
          hovered.className = '';
        }

        that.className = 'pseudo-hover';
      };

      // change the theme picker style when the custom theme is changed
      document.getElementById('fae_custom-theme').addEventListener('change', function () {
        fae_theme_picker.style.backgroundColor = fa_theme_color.selector.style.backgroundColor;
        fae_theme_picker.style.borderColor = fa_theme_color.selector.style.borderColor;
      });


      // create the theme list
      window.fae_theme_list = document.createElement('DIV');
      fae_theme_list.id = 'fae_theme_list';
      fae_theme_list.className = 'theme_list_hidden';
      fae_theme_list.style.width = fa_theme_color.selector.getBoundingClientRect().width + 'px';

      // prevent unwanted window scrolling when the theme list has been scrolled all the way from the top or bottom
      fae_theme_list.onwheel = function (e) {
        if ((fae_theme_list.scrollTop == (fae_theme_list.scrollHeight - fae_theme_list.clientHeight) && e.deltaY > 0) || fae_theme_list.scrollTop == 0 && e.deltaY < 0) {
          return false;
        }
      };

      // hide the theme list on scroll
      window.addEventListener('scroll', function () {
        if (!fae_theme_list.className) {
          fae_theme_list.className = 'theme_list_hidden';
        }
      });

      // get the original theme options and create new options for the updated UI
      for (var opts = fa_theme_color.selector.options, i = 0, j = opts.length, option; i < j; i++) {
        option = document.createElement('A');
        option.href = '#';
        option.dataset.index = i;
        option.innerHTML = opts[i].innerHTML;
        option.style.color = opts[i].style.color || '#FFF';
        option.style.backgroundColor = opts[i].style.backgroundColor;

        // apply the selected theme to both the new UI and hidden select element
        option.onclick = function () {
          var color = fa_theme_color.selector.options[this.dataset.index];

          color.selected = true;
          fae_theme_picker.innerHTML = fa_theme_color.selector.value;
          fae_theme_picker.dataset.selectedIndex = this.dataset.index;

          fa_theme_color.change(color.value);

          fae_theme_picker.style.backgroundColor = fa_theme_color.selector.style.backgroundColor;
          fae_theme_picker.style.borderColor = fa_theme_color.selector.style.borderColor;

          fae_theme_list.className = 'theme_list_hidden';
          fae_theme_picker.focus();

          return false;
        };

        // update selected option on hover
        option.onmouseover = function () {
          fae_hover_theme(this);
        };

        fae_theme_list.appendChild(option);
      }

      // add the theme picker, list, and style to the document
      frag.appendChild(fae_theme_picker);
      frag.appendChild(fae_theme_list);

      $('head').append(
        '<style type="text/css">'+
          '#footer_end #fae_theme_list,#page-footer #fae_theme_list{margin-top:-335px!important}'+
          'a#fae_theme_picker{color:#FFF;font-size:13px;font-family:Arial;background:#999;border:1px solid #888;position:relative;display:inline-block;padding:6px;margin:1px;float:left;text-decoration:none;outline:none;}'+
          '#fae_theme_picker:after{content:"\\f0dd";font-family:FontAwesome;position:absolute;right:4px}'+
          '#fae_theme_list{background:#FFF;border:1px solid rgba(0,0,0,.175);position:absolute;max-height:335px;overflow:auto;overflow-x:hidden;z-index:10;white-space:nowrap;visibility:visible}'+
          '#fae_theme_list.theme_list_hidden{visibility:hidden}'+
          '#fae_theme_list a{font-family:Arial;display:block;padding:6px;text-decoration:none}'+
          '#fae_theme_list a.pseudo-hover{color:#FFF!important;background:#28F!important}'+
          '@media (max-width: 768px) and (min-width: 0px) {body #fae_theme_picker{float:right;width:240px !important;margin:0 0 6px}body #fae_theme_list{width:252px !important}}'+
        '</style>'
      );

      fa_theme_color.selector.parentNode.insertBefore(frag, fa_theme_color.selector);
      fa_theme_color.selector.style.display = 'none'; // hide to original theme selector element
    }

  });
}());

function fae_editColor (str, op) {
  var letter = { 'F' : 15, 'E' : 14, 'D' : 13, 'C' : 12, 'B' : 11, 'A' : 10 },
      hex = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B', 'C', 'D', 'E', 'F'],
      neg = [0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6];

  str = str.toUpperCase().split('');

  for (var i = 1; i < 7; i++) {
    if (letter[str[i]]) {
      str[i] = letter[str[i]];
    } else {
      str[i] = +str[i];
    }

    if (op == 'darken') {
      str[i] = neg[str[i]];
    } else {
      str[i] += op;
    }

    if (str[i] > 15) {
      str[i] = 15;
    } else if (str[i] < 0) {
      str[i] = 0;
    }

    str[i] = hex[str[i]];
  }

  return str.join('');
};


/* -- 03. pseudoInputs -- */
// function to hide all checkboxes / radios and replace them with pseudo inputs
$(function() {
  for (var input = document.getElementsByTagName('INPUT'), i = 0, j = input.length, type; i < j; i++) {
    type = input[i].type;
    if (/radio|checkbox/i.test(type)) {
      input[i].className += ' fa_input_hidden';
      input[i].insertAdjacentHTML('afterend', '<span class="fa_pseudo_' + type + '" onclick="this.previousSibling.click(); return false;"/>');
    }
  }
});


/* -- 04. toolbar search mod -- */
// gives the search bar a placeholder and attaches an event handler to the button
window.fa_textarea_placeholer = 'Buscar...';

$(function(){
  $(function() {
    var fa_magnifier = document.getElementById('fa_magnifier'),
        fa_textarea = document.getElementById('fa_textarea');

    if (fa_magnifier) {
      fa_magnifier.onclick = function() {
        this.parentNode.submit();
      };
    }

    if (fa_textarea) {
      fa_textarea.value = fa_textarea_placeholer;

      fa_textarea.onfocus = function() {
        if (this.value == fa_textarea_placeholer) {
          this.value = '';
        }
      };

      fa_textarea.onblur = function() {
        if (!this.value) {
          this.value = fa_textarea_placeholer;
        }
      };

    }

  });
});


/* -- 05. fae_sticky_nav_panel -- */
// adds a sticky navigation for quick use when the navbar isn't visible
$(function() {
  window.fae_sticky = {
            // various user options
            navbar : 'navbar',
          position : 'right',
             title : 'Navegação Rápida',
           tooltip : 'Alternar Navegação Rápida',
    additionalHTML : '<div class="nav-actions"><a href="javascript:fae_sticky.copyURL();" title="Copiar BBCode URL"><i class="fa fa-link"></i></a>' + ( _userdata.user_level == 1 ? '<a href="/admin" title="Painel Admin"><i class="fa fa-wrench"></i></a>' : '' ) + '<a href="#top" title="Início da Página"><i class="fa fa-chevron-up"></i></a><a href="#bottom" title="Fim da Página"><i class="fa fa-chevron-down"></i></a></div>',
     alwaysVisible : false,

    // copy page URL as bbcode
    copyURL : function() {
      window.prompt('Copiar o BBCode URL abaixo. (CTRL+C)', '[url=' + window.location + ']' + document.title + '[/url]');
    },

    // listen for changes in the navbar's bottom rect
    scroll : function() {
      var rect = fae_sticky.navbar.getBoundingClientRect(),
          position = fae_sticky.node[0].style[fae_sticky.position];

      if (rect.bottom <= fae_sticky.offset[fae_sticky.tb_state] && position == '-30px') {
        fae_sticky.node[0].style[fae_sticky.position] = '';
      } else if (rect.bottom > fae_sticky.offset[fae_sticky.tb_state] && position != '-30px') {
        fae_sticky.node[0].style[fae_sticky.position] = '-30px';
        $(fae_sticky.node).removeClass('active');
      }
    },

    // offsets for when the toolbar is hidden / shown
    offset : {
      fa_hide : 0,
      fa_show : 30
    }
  };

  // nodes used in the module
  fae_sticky.node = [
    // button
    $('<a class="widget_menu column_button_' + fae_sticky.position + ' color-secondary" />').attr({
       href : '#',
         id : 'fa_sticky_nav_button',
      style : fae_sticky.position + ':-30px;',
      title : fae_sticky.tooltip

    }).click(function() {
      $(fae_sticky.node)[/active/.test(this.className) ? 'removeClass' : 'addClass']('active');
      return false;
    })[0],

    // panel
    $('<div id="fae_sticky_nav_panel" class="module_column column_' + fae_sticky.position + ' color-secondary" />')
    .html('<div class="title module_column_title">' + fae_sticky.title + '</div><div class="module_inner"></div>')[0]
  ];

  fae_sticky.navbar = document.getElementById(fae_sticky.navbar); // get the old navbar

  // then clone its contents and add it to the sticky panel
  $('.module_inner', fae_sticky.node[1]).append($('a.mainmenu', fae_sticky.navbar).clone()).append(fae_sticky.additionalHTML);
  $(document.body).append(fae_sticky.node);

  if (!fae_sticky.alwaysVisible) {
    fae_sticky.tb_state = my_getcookie('toolbar_state') || (_userdata.activate_toolbar ? 'fa_show' : 'fa_hide');
    fae_sticky.scroll();

    $(window).scroll(fae_sticky.scroll);

    $(function() {
      $('#fa_hide, #fa_show').click(function() {
        fae_sticky.tb_state = this.id;
      });
    });
  } else {
    fae_sticky.node[0].style[fae_sticky.position] = '';
  }
});


/* -- 06. image resizer -- */
(function() {
  window.fa_img_resizer = {
    max_width : 400, // maximum image width (400px)
    max_height : 250, // maximum image height (250px)

    selector : '.postbody .content img, .mod_news img, .message-text img', // where images should be resized

    options : {
            bar : true, // resized image options bar
        toggler : true, // Enlarge / Reduce Image
      full_size : true, // Mostrar tamanho grande
       download : false, // Baixar imagem link
       lightbox : true // lightbox effect
    },

    // texts
    lang : {
      full_size : '<i class="fa fa-external-link"></i> Mostrar tamanho grande',
        enlarge : '<i class="fa fa-search-plus"></i> Aumentar imagem',
         reduce : '<i class="fa fa-search-minus"></i> Reduzir imagem',
       download : '<i class="fa fa-download"></i> Baixar imagem',
       tooltip : 'Clique para ver imagem completa'
    },

    // resize all images inside the "resizeIn" elements
    resize : function() {
      for (var a = $(fa_img_resizer.selector), i = 0, j = a.length; i < j; i++) {
        if (!a[i].alt && (a[i].naturalWidth > fa_img_resizer.max_width || a[i].naturalHeight > fa_img_resizer.max_height)) {
          a[i].className += ' fa_img_reduced';

          // make the image a "link" if it's not wrapper with one
          if (fa_img_resizer.options.lightbox && a[i].parentNode.tagName != 'A') {
            a[i].style.cursor = 'pointer';
            a[i].title = fa_img_resizer.lang.tooltip;

            a[i].onclick = function() {
              fa_img_resizer.lightbox(this);
            };
          }

          // create the resize bar
          if (fa_img_resizer.options.bar) {
            (a[i].parentNode.tagName == 'A' ? a[i].parentNode : a[i]).insertAdjacentHTML('beforebegin',
              '<div class="fa_img_resizer" style="width:' + (a[i].width -  + 'px;">'+
                (fa_img_resizer.options.toggler ? '<a class="fa_img_enlarge" href="#" onclick="fa_img_resizer.toggle(this); return false;">' + fa_img_resizer.lang.enlarge + '</a>' : '')+
                (fa_img_resizer.options.full_size ? '<a class="fa_img_full" href="/viewimage.forum?u=' + a[i].src + '" target="_blank">' + fa_img_resizer.lang.full_size + '</a>' : '')+
                (fa_img_resizer.options.download && !/Firefox/.test(navigator.userAgent) && 'download' in document.createElement('A') ? '<a class="fa_img_download" href="' + a[i].src + '" target="_blank" download>' + fa_img_resizer.lang.download + '</a>' : '' )+
              '</div>'
            );
          }
        }
      }
    },

    // toggle between enlarged and reduced image sizes
    toggle : function(that) {
      var img = that.parentNode.nextSibling;

      if (img.tagName == 'A') {
        img = img.getElementsByTagName('IMG')[0];
      }

      if (/fa_img_reduced/.test(img.className)) {
        that.innerHTML = fa_img_resizer.lang.reduce;
        that.className = 'fa_img_reduce';
        img.className = img.className.replace(/fa_img_reduced/, 'fa_img_enlarged');
      } else {
        that.innerHTML = fa_img_resizer.lang.enlarge;
        that.className = 'fa_img_enlarge';
        img.className = img.className.replace(/fa_img_enlarged/, 'fa_img_reduced');
      }

      that.parentNode.style.width = img.width - 8 + 'px';
    },

    // lightbox effect
    lightbox : function(that) {
      var frag = document.createDocumentFragment(),
          overlay = $('<div id="fa_img_lb_overlay" />')[0],
          img = $('<img id="fa_img_lb_image" src="' + that.src + '" />')[0];

      overlay.onclick = fa_img_resizer.kill_lightbox;
      img.onclick = fa_img_resizer.kill_lightbox;

      frag.appendChild(overlay);
      frag.appendChild(img);
      document.body.appendChild(frag);
      document.body.style.overflow = 'hidden';

      img.style.marginTop = '-' + (img.height / 2) + 'px';
      img.style.marginLeft = '-' + (img.width / 2) + 'px';
    },

    // kill the lightbox
    kill_lightbox : function() {
      var overlay = document.getElementById('fa_img_lb_overlay'),
          img = document.getElementById('fa_img_lb_image');

      overlay && document.body.removeChild(overlay);
      img && document.body.removeChild(img);
      document.body.style.overflow = '';
    }
  };

  // write styles into the document head
  document.write(
    '<style type="text/css">'+
      fa_img_resizer.selector + ', .fa_img_reduced { max-width:' + fa_img_resizer.max_width + 'px; max-height:' + fa_img_resizer.max_height + 'px; }'+
      '.fa_img_enlarged { max-width:100% !important; max-height:100% !important; }'+
      '.fa_img_resizer { font-size:12px; text-align:left; padding:3px; margin:3px 0; background:#FFF; border:1px solid #CCC; }'+
      '.fa_img_resizer a { display:inline-block; margin:0 3px; }'+
      '.fa_img_resizer i { font-size:14px; vertical-align:middle; }'+
      '#fa_img_lb_overlay { background:rgba(0, 0, 0, 0.7); position:fixed; top:0; right:0; bottom:0; left:0; z-index:999999; cursor:pointer; }'+
      '#fa_img_lb_image { max-height:100%; max-width:100%; position:fixed; left:50%; top:50%; z-index:9999999; cursor:pointer; }'+
    '</style>'
  );

  // begin modifying images when the page is loaded
  $(window).load(fa_img_resizer.resize);

  // kill forumactif's image resizer
  if (window.resize_images) {
    window.resize_images = function() {
      return false;
    };
  }
}());


/* -- 07. fae_toggle_category -- */
function fae_toggle_category(that) {
  var next = that.nextSibling;
  that.className = 'title ';

  if (next.style.display == 'none') {
    next.style.display = '';
    that.className += 'c_hide';
    my_setcookie('fae_' + next.id, 'shown');
  } else {
    next.style.display = 'none';
    that.className += 'c_show';
    my_setcookie('fae_' + next.id, 'hidden');
  }
};


/* -- 08. sticky_nav_notifications -- */
$(function() {
  if (_userdata.session_logged_in) {
    var nav = document.getElementById('fae_sticky_nav_panel'),
        a = $('<a class="mainmenu" href="/profile?mode=editprofile&page_profil=notifications">Notificações</a>')[0];

    if (nav) {
      $('a[href="/privmsg?folder=inbox"]', nav).after(a);

      $.get('/notification.forum', function(o) {
        if (o && o.unread) {
          a.insertAdjacentHTML('beforeend', ' <span id="sticky_notif_unread">(' + o.unread + ')</span>');
        }
      }, 'json');
    }
  }
});


/* -- 09. update_notifier -- */
$(function() {
  if (_userdata.user_id == 1 && !my_getcookie('fae_update_alerted')) {

    $.get('https://raw.githubusercontent.com/SethClydesdale/forumactif-edge/master/javascripts/version-data.js', function(d) {
      var script = document.createElement('SCRIPT');
      script.type = 'text/javascript';
      script.text = d.replace(/forumactif_edge_version_data/, 'fae_github_version_data');
      document.body.appendChild(script);

      if (forumactif_edge_version_data.length < fae_github_version_data.length) {
        alert('An update has been found for Forumactif Edge. When you\'re ready, please proceed to your FAE Control Panel and click "Check for updates" to begin the update process.');
      }

      my_setcookie('fae_update_alerted', '1');
    });

  }
});


/* -- 10. topic_icon_formatter -- */
$(function() {
  var a = $('.forum-info[style*="background-image"]'),
      i = 0,
      j = a.length;

  if (j) {
    for (; i < j; i++) {
      a[i].insertAdjacentHTML('afterbegin', '<img class="topic-icon" src="' + a[i].style.backgroundImage.replace(/.*?url\((.*?)\).*/, '$1').replace(/'|"/g, '') + '" />');
      a[i].style.backgroundImage = '';
    }

    $('head').append('<style type="text/css">.topic-icon{vertical-align:middle;margin:0 3px;}</style>');
  }
});


/* -- 11. dark mode -- */
(function() {
  window.fae_lightSwitchMode = my_getcookie('fae_light-switch-mode') || 'dark';

  document.write('<style type="text/css">#fae_light-switch-container{margin:6px 0}#fae_light-switch-label{font-weight:700;vertical-align:middle}#fae_light-switch{background-color:rgba(0,0,0,.25);vertical-align:middle;display:inline-block;position:relative;height:26px;width:56px;border-radius:20px;cursor:pointer;overflow:hidden}#fae_light-switch>input{display:none}#fae_light-switch>div{background-color:rgba(255,255,255,.5);position:absolute;top:3px;left:3px;height:20px;width:20px;border-radius:20px;transition:.4s;font-size:13px;font-weight:700;line-height:22px}#fae_light-switch>div:before{content:"ON";margin-left:-24px;color:transparent;transition:.4s}#fae_light-switch>div:after{content:"OFF";margin-left:30px;color:rgba(255,255,255,.5);transition:.4s}#fae_light-switch>input:checked+div{background-color:#FFF;left:33px}#fae_light-switch>input:checked+div:before{color:#FFF}#fae_light-switch>input:checked+div:after{color:transparent}</style>');

  var footer = '.footer-links.left',

      cookie = my_getcookie('fae_light-switch'),
      rgb,
      button,
      container,

      changeTheme = function (cookie) {
        var button = document.querySelector('#fae_light-switch input');

        if ((button && button.checked) || cookie == 'on') {
          my_setcookie('fae_light-switch', 'on', true);

          if (window.sessionStorage && window.sessionStorage.faeLightSwitch) {
            $('head').append('<style type="text/css" id="fae_light-switch-css">' + window.sessionStorage.faeLightSwitch + '</style>');
          } else {
            $.get('https://raw.githubusercontent.com/SethClydesdale/forumactif-edge/master/css/dark-mode/' + fae_lightSwitchMode + '-mode.min.css', function (d) {
              $('head').append('<style type="text/css" id="fae_light-switch-css">' + d + '</style>');

              if (window.sessionStorage) {
                window.sessionStorage.faeLightSwitch = d;
              }
            });
          }

        } else {
          var css = document.getElementById('fae_light-switch-css');

          my_setcookie('fae_light-switch', 'off', true);

          if (css) {
            document.head.removeChild(css);
          }
        }
      };

  cookie && changeTheme(cookie);

  $(function() {
    if (!my_getcookie('fae_light-switch-mode')) {
      rgb = window.getComputedStyle(document.body, null).getPropertyValue('background-color').replace(/rgb\(|\)|\s/g, '').split(',');
      fae_lightSwitchMode = Math.round(((parseInt(rgb[0]) * 299) + (parseInt(rgb[1]) * 587) + (parseInt(rgb[2]) * 114)) /1000) > 125 ? 'dark' : 'light';

      my_setcookie('fae_light-switch-mode', fae_lightSwitchMode, true);
    }

    footer = document.querySelector(footer);

    if (footer) {
      button = document.createElement('LABEL');
      button.id = 'fae_light-switch';
      button.innerHTML = '<input type="checkbox" ' + (cookie == 'on' ? 'checked="true"' : '') + '/><div></div>';
      button.firstChild.onchange = changeTheme;

      container = document.createElement('DIV');
      container.id = 'fae_light-switch-container';
      container.innerHTML = '<span id="fae_light-switch-label">' + (fae_lightSwitchMode == 'dark' ? 'Modo Escuro:' : 'Modo Claro:') + '</span>';

      container.appendChild(button);
      footer.appendChild(container);
    }
  });
}());


/* -- 12. copy code button -- */
$.getScript('https://cdn.jsdelivr.net/clipboard.js/1.5.16/clipboard.min.js', function() {
  window.fae_copyCode = {
    copy : 'Copiar Código',
    copied : 'Copiado!'
  };

  $(function() {
    var a = $('.codebox dt').not('.spoiler > dt, .hidecode > dt'),
        i = 0,
        j = a.length;

    if (a[0]) {
      $('head').append('<style type="text/css">.fae_copy-code{float:right;cursor:pointer}.fae_copy-code:before{content:"\\f0ea";font-size:13px;font-family:FontAwesome;text-align:center;color:#69C;background:#FFF;border-radius:100%;display:inline-block;width:19px;height:19px;line-height:19px;margin:-1px 3px 0 3px}.codebox .fae_copy-code:hover:before{color:#EB5}.codebox .fae_copy-code.fae_copied:before{content:"\\f00c";font-weight:700;color:#8B5}</style>');

      for (; i < j; i++) {
        a[i].insertAdjacentHTML('beforeend', '<span class="fae_copy-code">' + fae_copyCode.copy + '</span>');
      }

      new Clipboard('.fae_copy-code',{
        target : function (copy) {
          if (copy.innerHTML != fae_copyCode.copied) {
            return $(copy).closest('.codebox').find('code')[0];
          }
        }
      }).on('success', function (e) {
        var copy = e.trigger;

        if (copy.innerHTML != fae_copyCode.copied) {
          copy.innerHTML = fae_copyCode.copied;
          copy.className += ' fae_copied';

          window.setTimeout(function() {
            copy.innerHTML = fae_copyCode.copy;
            copy.className = copy.className.replace('fae_copied', '');
          }, 1000);
        }

        e.clearSelection();
      });
    }

  });
});



/* -- 13. local frame styler -- */
// global function for getting local iframes
function fae_styleLocalFrames () {
  var frame = $('iframe[src^="/"], object[data^="/"]'),
      i = 0,
      j = frame.length;

  for (; i < j; i++) {
    try {
      var head = $('head', frame[i].contentDocument || frame[i].contentWindow.document);

      $('#fa_theme_style, #fae_light-switch-css', head).remove();
      head.append($('#fa_theme_style, #fae_light-switch-css').clone());

    } catch (error) {
      window.console && console.log(error);
    }
  }

};


// waits for frames to load (such as chatbox and smilies) and then applies preferred styles to them
$(window).load(function() {
  fae_styleLocalFrames();
  $('iframe[src^="/"]').on('load', fae_styleLocalFrames);
  $('object[data^="/"]').attr('onload', 'fae_styleLocalFrames();');
  $('#fae_custom-theme, #fa_theme_selector, #fae_light-switch input').on('change', fae_styleLocalFrames);
});


Cordialmente,
pedxz.

Não funcionou, deu erro.
Ketholy

Ketholy
Membro do Fórum

Feminino
Inscrito dia : 20/01/2017
Mensagens : 1297
Pontos Ativos : 1558

Ver perfil do usuário http://jogosrpg-com-br.forumais.com/forum http://assuntosgeral-com-br.forumais.com https://twitter.com/Ketholy Suan

Atendido / Resolvido Re: Widgets no fórum

Mensagem por Pedxz em 21.12.18 11:53

Localize e remova na sua folha de estilo, o seguinte código:
Código:
.module_column.column_left:not(.active){left:-250px}.module_column.column_right:not(.active){right:-250px}.column_button_left.active{left:250px}.column_button_right.active{right:250px}
Pedxz

Pedxz
Moderadeiro
Moderadeiro

Masculino
Inscrito dia : 13/01/2017
Mensagens : 2809
Pontos Ativos : 3561

Ver perfil do usuário https://pedxz.forumeiros.com

Atendido / Resolvido Re: Widgets no fórum

Mensagem por Ketholy em 21.12.18 12:26

@Pedxz escreveu:Localize e remova na sua folha de estilo, o seguinte código:
Código:
.module_column.column_left:not(.active){left:-250px}.module_column.column_right:not(.active){right:-250px}.column_button_left.active{left:250px}.column_button_right.active{right:250px}

Retirei mais o código continua sem funcionar.
Ketholy

Ketholy
Membro do Fórum

Feminino
Inscrito dia : 20/01/2017
Mensagens : 1297
Pontos Ativos : 1558

Ver perfil do usuário http://jogosrpg-com-br.forumais.com/forum http://assuntosgeral-com-br.forumais.com https://twitter.com/Ketholy Suan

Atendido / Resolvido Re: Widgets no fórum

Mensagem por Ketholy em 26.12.18 21:11

Up!!!
Ketholy

Ketholy
Membro do Fórum

Feminino
Inscrito dia : 20/01/2017
Mensagens : 1297
Pontos Ativos : 1558

Ver perfil do usuário http://jogosrpg-com-br.forumais.com/forum http://assuntosgeral-com-br.forumais.com https://twitter.com/Ketholy Suan

Atendido / Resolvido Re: Widgets no fórum

Mensagem por RafaelS. em 27.12.18 23:39

Olá @Ketholy!

Podia explicar um pouco melhor a sua questão?

Fico no aguardo. Piscada




Eu sou o RafaelS.,
Eu aconselho-lhe ler os seguintes tópicos:

Seta Para evitar ser punido é importante que leia  o regulamento geral do Fórum dos fóruns.
Seta Antes de criar o seu pedido de suporte certifique-se de ler o regulamento da seção de suporte.
Seta Quando for criar o seu tópico tente ser o mais específico possível, para que nós possámos entender!

"Suba na vida, mas não faça de seus amigos os degraus de sua escada, vença pela sua capacidade sempre com Honestidade,Caráter e Amor!"

Widgets no fórum 2169
Widgets no fórum 15074
RafaelS.

RafaelS.
Moderadeiro
Moderadeiro

Masculino
Inscrito dia : 26/04/2014
Mensagens : 4695
Pontos Ativos : 5747

Ver perfil do usuário http://techmais.forumeiros.com/

Atendido / Resolvido Re: Widgets no fórum

Mensagem por Ketholy em 28.12.18 14:17

@RafaelS. escreveu:Olá @Ketholy!

Podia explicar um pouco melhor a sua questão?

Fico no aguardo. Piscada

Olá RafaelS,

Então minha questão é que os Widgets são anexados no lugar de aparecer normal no fórum, tem que clicar em um botão pra visualizar eles. Eu não quero eles assim, quero que apareça normalmente do lado esquedo das categorias e sub-fóruns. O código é esse:

Código:
/******************************
** ======= FUNCTIONS ======= **
*******************************
** 00. fa_initForumModules
** 01. fa_navactif
** 02. fa_theme_changer
** 03. pseudoInputs
** 04. toolbar search mod
** 05. fae_sticky_nav_panel
** 06. image resizer
** 07. fae_toggle_category
** 08. sticky_nav_notifications
** 09. update_notifier
** 10. topic_icon_formatter
** 11. dark mode
** 12. copy code button
** 13. local frame styler
******************************/
 
// IMPORTANT DATA (DO NOT DELETE)
if (!window.FAE) {
  window.FAE = new Object();
}
 
FAE.board_lang =  'Português';
 
 
/* -- 00. fa_initForumModules -- */
// initiate the toggler for the widget columns
function fa_initForumModules(column_id) {
  var column = document.getElementById(column_id), menu;
 
  if (column) {
    column.insertAdjacentHTML('afterbegin', '<div class="title module_column_title">Menu Widget</div>');
 
    menu = document.createElement('A');
    menu.href = '#';
    menu.title = 'Alternar o widget menu';
    menu.className = 'widget_menu column_button_' + column_id + ' color-secondary';
 
    menu.onclick = function() {
      var column = document.getElementById(/left/.test(this.className) ? 'left' : 'right');
 
      $([this, column])[/active/.test(this.className) ? 'removeClass' : 'addClass']('active');
      return false;
    };
 
    document.body.appendChild(menu);
  }
};
 
// give active panels a very high z-index so they display above other panels and buttons
// forumotion replaces any z-index above 1000 w/999 in the stylesheet, so this must be applied via JS
document.write('<style type="text/css">'+
  '.module_column, .widget_menu { z-index:30000; }'+
  '.module_column.active, .widget_menu.active { z-index:99999; }'+
'</style>');
 
 
/* -- 01. fa_navactif -- */
// finds the currently active navigation item and adds a classname to it.
function fa_navactif() {
  for (var cleanURI = window.location.href.replace(/\?.*|#.*/, ''), a = document.getElementById('page-header').getElementsByTagName('A'), i = 0, j = a.length; i < j; i++) {
    if (/mainmenu/.test(a[i].className) && cleanURI == a[i].href.replace(/\?.*|#.*/,'')) {
      a[i].className+=' fa_navactif';
      break;
    }
  }
  $('.mainmenu[href="/search"]').removeAttr('onclick');
};
 
 
/* -- 02. fa_theme_changer -- */
// theme selector for the forum
(function() {
  var cc = my_getcookie('fae_custom-theme');
 
  window.fa_theme_color = {
    selected : my_getcookie('fa_theme_color') || 'Selecionar um tema',
 
    palette : {
"Selecionar um tema" : [],
"Tema Personalizado" : [cc ? fae_editColor(cc, +1) : '#77AADD', cc || '#6699CC', cc ? fae_editColor(cc, -1) : '#5588BB', cc ? fae_editColor(cc, -3) : '#336699', cc ? fae_editColor(cc, 'darken') : '#334455'],
"Tema Aleatório" : [],
"Silver" : ["#DDDDDD", "#cccccc", "#BBBBBB", "#999999", "#555555"],
"Dusty Gray" : ["#AAAAAA", "#999999", "#888888", "#666666", "#444444"],
"Dove Gray" : ["#777777", "#666666", "#555555", "#333333", "#333333"],
"Mine Shaft" : ["#444444", "#333333", "#222222", "#000000", "#222222"],
"Persian Red" : ["#DD4444", "#cc3333", "#BB2222", "#990000", "#552222"],
"Christmas Red" : ["#CC3333", "#bb2222", "#AA1111", "#880000", "#441111"],
"Coral Red" : ["#FF5555", "#ff4444", "#EE3333", "#CC1111", "#662222"],
"Chestnut Rose" : ["#DD7777", "#cc6666", "#BB5555", "#993333", "#553333"],
"Eunry" : ["#DDAAAA", "#cc9999", "#BB8888", "#996666", "#554444"],
"Brandy Rose" : ["#CC9999", "#bb8888", "#AA7777", "#885555", "#443333"],
"Bazaar" : ["#AA8888", "#997777", "#886666", "#664444", "#443333"],
"Cinnabar" : ["#FF5544", "#ee4433", "#DD3322", "#BB1100", "#552222"],
"Crail" : ["#CC6655", "#bb5544", "#AA4433", "#882211", "#442222"],
"Flamingo" : ["#FF6644", "#ee5533", "#DD4422", "#BB2200", "#552222"],
"Red Damask" : ["#EE7755", "#dd6644", "#CC5533", "#AA3311", "#553322"],
"Tabasco" : ["#AA4422", "#993311", "#882200", "#660000", "#442211"],
"Paarl" : ["#BB6644", "#aa5533", "#994422", "#772200", "#442222"],
"Cape Palliser" : ["#BB7755", "#aa6644", "#995533", "#773311", "#443322"],
"Tuscany" : ["#DD7744", "#cc6633", "#BB5522", "#993300", "#553322"],
"Hot Cinnamon" : ["#EE7733", "#dd6622", "#CC5511", "#AA3300", "#553311"],
"Blaze Orange" : ["#FF7711", "#ff6600", "#EE5500", "#CC3300", "#663300"],
"Pumpkin" : ["#FF8822", "#ff7711", "#EE6600", "#CC4400", "#663311"],
"Antique Brass" : ["#DDAA77", "#cc9966", "#BB8855", "#996633", "#554433"],
"Raw Sienna" : ["#DD9955", "#cc8844", "#BB7733", "#995511", "#553322"],
"Earthtone" : ["#775533", "#664422", "#553311", "#331100", "#332211"],
"Americano" : ["#998877", "#887766", "#776655", "#554433", "#333333"],
"Coffee" : ["#887766", "#776655", "#665544", "#443322", "#333322"],
"Cinnamon" : ["#995511", "#884400", "#773300", "#551100", "#332200"],
"Brown" : ["#AA6611", "#995500", "#884400", "#662200", "#442200"],
"Sandy Tan" : ["#EECC99", "#ddbb88", "#CCAA77", "#AA8855", "#554433"],
"Hokey Pokey" : ["#DDAA44", "#cc9933", "#BB8822", "#996600", "#554422"],
"Sienna" : ["#776644", "#665533", "#554422", "#332200", "#332222"],
"Shadow" : ["#998866", "#887755", "#776644", "#554422", "#333322"],
"Buttercup" : ["#FFBB22", "#eeaa11", "#DD9900", "#BB7700", "#554411"],
"Tulip Tree" : ["#FFCC44", "#eebb33", "#DDAA22", "#BB8800", "#554422"],
"Golden Grass" : ["#EEBB33", "#ddaa22", "#CC9911", "#AA7700", "#554411"],
"Pizza" : ["#DDAA22", "#cc9911", "#BB8800", "#996600", "#554411"],
"Reef Gold" : ["#BB9933", "#aa8822", "#997711", "#775500", "#443311"],
"Olive" : ["#999911", "#888800", "#777700", "#555500", "#333300"],
"Camouflage" : ["#555522", "#444411", "#333300", "#111100", "#222211"],
"Avocado" : ["#999977", "#888866", "#777755", "#555533", "#333333"],
"Earls Green" : ["#DDDD44", "#cccc33", "#BBBB22", "#999900", "#555522"],
"Laser" : ["#DDDD77", "#cccc66", "#BBBB55", "#999933", "#555533"],
"Pine Glade" : ["#DDDDAA", "#cccc99", "#BBBB88", "#999966", "#555544"],
"Pea Green" : ["#88AA33", "#779922", "#668811", "#446600", "#334411"],
"Celery" : ["#AADD44", "#99cc33", "#88BB22", "#669900", "#445522"],
"Chartreuse" : ["#99EE11", "#88dd00", "#77CC00", "#55AA00", "#335500"],
"Forumactif Green" : ["#99DD44", "#88cc33", "#77BB22", "#559900", "#335522"],
"Dollar Bill" : ["#99CC66", "#88bb55", "#77AA44", "#558822", "#334422"],
"Wild Willow" : ["#AADD77", "#99cc66", "#88BB55", "#669933", "#445533"],
"Asparagus" : ["#88BB66", "#77aa55", "#669944", "#447722", "#334422"],
"Atlantis" : ["#77DD44", "#66cc33", "#55BB22", "#339900", "#335522"],
"Forest Green" : ["#339933", "#228822", "#117711", "#005500", "#113311"],
"Christmas Green" : ["#117711", "#006600", "#005500", "#003300", "#003300"],
"Apple" : ["#44DD44", "#33cc33", "#22BB22", "#009900", "#225522"],
"Mantis" : ["#77DD77", "#66cc66", "#55BB55", "#339933", "#335533"],
"De York" : ["#AADDAA", "#99cc99", "#88BB88", "#669966", "#445544"],
"Envy" : ["#99BB99", "#88aa88", "#779977", "#557755", "#334433"],
"Spruce" : ["#77DD88", "#66cc77", "#55BB66", "#339944", "#335533"],
"Bottle Green" : ["#22BB44", "#11aa33", "#009922", "#007700", "#114422"],
"Aqua Forest" : ["#77BB88", "#66aa77", "#559966", "#337744", "#334433"],
"Mountain Meadow" : ["#44DD77", "#33cc66", "#22BB55", "#009933", "#225533"],
"Meadow" : ["#33BB66", "#22aa55", "#119944", "#007722", "#114422"],
"Sea Green" : ["#449966", "#338855", "#227744", "#005522", "#223322"],
"Amazon" : ["#448866", "#337755", "#226644", "#004422", "#223322"],
"Emerald" : ["#77DDAA", "#66cc99", "#55BB88", "#339966", "#335544"],
"Shamrock" : ["#44DDAA", "#33cc99", "#22BB88", "#009966", "#225544"],
"Blue Lagoon" : ["#55CCBB", "#44bbaa", "#33AA99", "#118877", "#224444"],
"Turquoise" : ["#44DDDD", "#33cccc", "#22BBBB", "#009999", "#225555"],
"Downy" : ["#77DDDD", "#66cccc", "#55BBBB", "#339999", "#335555"],
"Sinbad" : ["#AADDDD", "#99cccc", "#88BBBB", "#669999", "#445555"],
"Teal" : ["#119999", "#008888", "#007777", "#005555", "#003333"],
"Blue Chill" : ["#2299AA", "#118899", "#007788", "#005566", "#113344"],
"Cerulean" : ["#11BBEE", "#00aadd", "#0099CC", "#0077AA", "#004455"],
"Deep Cerulean" : ["#1188BB", "#0077aa", "#006699", "#004477", "#003344"],
"Curious Blue" : ["#44AADD", "#3399cc", "#2288BB", "#006699", "#224455"],
"Slate Gray" : ["#8899AA", "#778899", "#667788", "#445566", "#333344"],
"Danube" : ["#77AADD", "#6699cc", "#5588BB", "#336699", "#334455"],
"Azure Radiance" : ["#1188FF", "#0077ff", "#0066EE", "#0044CC", "#003366"],
"Mariner" : ["#4477DD", "#3366cc", "#2255BB", "#003399", "#223355"],
"Azure" : ["#4466BB", "#3355aa", "#224499", "#002277", "#222244"],
"Governor Bay" : ["#4444DD", "#3333cc", "#2222BB", "#000099", "#222255"],
"Blue Marguerite" : ["#7777DD", "#6666cc", "#5555BB", "#333399", "#333355"],
"Blue Bell" : ["#AAAADD", "#9999cc", "#8888BB", "#666699", "#444455"],
"Comet" : ["#666688", "#555577", "#444466", "#222244", "#222233"],
"Purple Heart" : ["#7744DD", "#6633cc", "#5522BB", "#330099", "#332255"],
"Amethyst" : ["#AA77DD", "#9966cc", "#8855BB", "#663399", "#443355"],
"Amethyst Smoke" : ["#BBAACC", "#aa99bb", "#9988AA", "#776688", "#444444"],
"Mauve" : ["#EEBBFF", "#ddaaff", "#CC99EE", "#AA77CC", "#554466"],
"Affair" : ["#8855AA", "#774499", "#663388", "#441166", "#332244"],
"Purple" : ["#AA44DD", "#9933cc", "#8822BB", "#660099", "#442255"],
"Lavendar" : ["#CC88EE", "#bb77dd", "#AA66CC", "#8844AA", "#443355"],
"Cerise" : ["#DD44DD", "#cc33cc", "#BB22BB", "#990099", "#552255"],
"Fuchsia Pink" : ["#DD77DD", "#cc66cc", "#BB55BB", "#993399", "#553355"],
"Lilac" : ["#DDAADD", "#cc99cc", "#BB88BB", "#996699", "#554455"],
"Red Violet" : ["#DD44AA", "#cc3399", "#BB2288", "#990066", "#552244"],
"Disco" : ["#992266", "#881155", "#770044", "#550022", "#331122"],
"Carnation Pink" : ["#FFAADD", "#ff99cc", "#EE88BB", "#CC6699", "#664455"],
"Hopbush" : ["#DD77AA", "#cc6699", "#BB5588", "#993366", "#553344"],
"French Rose" : ["#FF5599", "#ee4488", "#DD3377", "#BB1155", "#552233"],
"Hibiscus" : ["#DD4477", "#cc3366", "#BB2255", "#990033", "#552233"],
"Claret" : ["#882244", "#771133", "#660022", "#440000", "#331122"],
"Bordeaux" : ["#771133", "#660022", "#550011", "#330000", "#330011"],
"Tickle Me Pink" : ["#FF99BB", "#ff88aa", "#EE7799", "#CC5577", "#663344"],
"Burgundy" : ["#991133", "#880022", "#770011", "#550000", "#330011"],
"Blush" : ["#EE6688", "#dd5577", "#CC4466", "#AA2244", "#552233"],
"Wild Watermelon" : ["#FF6688", "#ff5577", "#EE4466", "#CC2244", "#662233"],
"Amaranth" : ["#FF4466", "#ee3355", "#DD2244", "#BB0022", "#552222"],
"Mauvelous" : ["#FFAABB", "#ff99aa", "#EE8899", "#CC6677", "#664444"],
"Alizarin Crimson" : ["#FF3344", "#ee2233", "#DD1122", "#BB0000", "#551122"]
 
},
 
    change : function(color) {
      var head = document.getElementsByTagName('HEAD')[0],
          style = document.getElementById('fa_theme_style');
 
      my_setcookie('fa_theme_color', color, true);
 
      if (color != 'Selecionar um tema' && color != 'Tema Personalizado') {
        fa_theme_color.selected = color == 'Tema Aleatório' ? fa_theme_color.palette['Tema Aleatório'][Math.floor(Math.random() * fa_theme_color.palette['Tema Aleatório'].length)] : color;
        fa_theme_color.selector.style.backgroundColor = fa_theme_color.palette[fa_theme_color.selected][1];
        fa_theme_color.selector.style.borderColor = fa_theme_color.palette[fa_theme_color.selected][2];
        fa_theme_color.selector.firstChild.innerHTML = 'Tema Padrão';
 
        if (style) head.removeChild(style);
        fa_theme_color.picker.style.display = 'none';
 
        $(head).append('<style type="text/css" id="fa_theme_style">' + fa_theme_color.css() + '</style>');
 
      } else if (color == 'Tema Personalizado') {
        fa_theme_color.selected = 'Tema Personalizado';
 
        if (style) {
          head.removeChild(style);
        }
 
        var val = fa_theme_color.picker.value.toUpperCase();
        my_setcookie('fae_custom-theme', val, true);
 
        fa_theme_color.picker.style.display = '';
        fa_theme_color.selector.style.backgroundColor = val;
        fa_theme_color.selector.style.borderColor = fae_editColor(val, -1);
 
        window.fa_theme_color.palette['Tema Personalizado'] = [
          fae_editColor(val, +1),
          val,
          fae_editColor(val, -1),
          fae_editColor(val, -3),
          fae_editColor(val, 'darken')
        ];
 
        $(head).append('<style type="text/css" id="fa_theme_style">' + fa_theme_color.css() + '</style>');
 
      } else {
        if (style) {
          head.removeChild(style);
        }
 
        fa_theme_color.picker.style.display = 'none';
 
        fa_theme_color.selector.style.backgroundColor = '#999';
        fa_theme_color.selector.style.borderColor = '#888';
        fa_theme_color.selector.firstChild.innerHTML = 'Selecionar um tema';
      }
    },
 
    css : function() {
      var palette = fa_theme_color.palette[fa_theme_color.selected];
      return '.color-primary, .title, h2.u, .h3, .inner h1.page-title, .mainmenu:after, .forumline tbody .catHead, form.search-form input.search-keywords, input.search-button, .pagination span a, a.button1, a.button2, button.button2, input.button1, input.button2, input.button, #profile-advanced-add a, img[src*="?poll"], .fa_pseudo_radio:after, #tabs, body div.sceditor-dropdown .button, .codebox dt, blockquote cite, .sceditor-container .sceditor-toolbar, body #fa_toolbar, body #fa_toolbar_hidden, body #fa_toolbar #fa_right #notif_list li.see_all, #fae_sticky_nav_panel a:after, img[src*="color=primary"], .table1 thead th, .breadcrumbs, input[type="button"], input[type="submit"], input[type="reset"], input[type="file"], .forumbg li.header, #chatbox_header, body #chatbox_footer { background-color:' + palette[1] + '; }'+
            '#cp-main h1:not(.title) { background-color:' + palette[1] + '; }'+
            '.pagination span a:hover, a.button1:hover, a.button2:hover, button.button2:hover, input.button1:hover, input.button2:hover, input.button:hover, #profile-advanced-add a:hover, input.search-button:hover, body div.sceditor-dropdown .button:hover, img[src*="color=primary"]:hover, input[type="button"]:hover, input[type="submit"]:hover, input[type="reset"]:hover, input[type="file"]:hover { background-color:' + palette[2] + '; }'+
            '.pagination span a:active, .pagination span a:focus, .pagination span strong, a.button1:active, a.button2:active, button.button2:active, input.button1:active, input.button2:active, input.button:active, input[type="button"]:active, input[type="submit"]:active, input[type="reset"]:active, input[type="file"]:active, a.button1:focus, a.button2:focus, button.button2:focus, input.button1:focus, input.button2:focus, input.button:focus, input.search-button:focus, #tabs a:after, body div.sceditor-dropdown .button:active, body div.sceditor-dropdown .button:focus, body #fa_search #fa_textarea, body #fa_search #fa_magnifier, img[src*="color=primary"]:active, input[type="button"]:focus, input[type="submit"]:focus, input[type="reset"]:focus, input[type="file"]:focus { background-color:' + palette[3] + '; }'+
            '.fa_pseudo_checkbox:after, h2.post-content, h3.post-content, h4.post-content, .codebox .fae_copy-code:before { color:' + palette[1] + '; }'+
            'img[src*="?poll"], .sceditor-container .sceditor-toolbar, .sceditor-container .sceditor-group, body #fa_toolbar, body #fa_toolbar_hidden { border-color:' + palette[2] + '; }'+
            '.color-secondary, .forum-status[style*="locked=true"], img[src*="color=secondary"] { background-color:' + palette[4] + '; }'+
            '.forum-status[style*="state=new"] { background-color:' + palette[0] + '; }'+
            'form.search-form { background-color:' + palette[2] + '; }'+
            'form.search-form input.search-keywords, input.search-button { border-color:' + palette[0] + '!important; }'+
            'input[type="text"]:hover, input.post:hover, input.inputbox:hover, textarea:hover, select:hover, input[type="text"]:focus, input.post:focus, input.inputbox:focus, textarea:focus, select:focus, body div.sceditor-dropdown input:focus, body div.sceditor-dropdown textarea:focus, .fa_pseudo_checkbox:hover, .fa_pseudo_radio:hover, .sceditor-container, h2.post-content, h3.post-content, h4.post-content, .lastpost-avatar, #wio_new_avatar, .avatar-mini img, .avatar, #chatbox, #chatbox_members, #chatbox_members > h4.away, #chatbox_members > ul.away-users, body #chatbox .cb-avatar { border-color:' + palette[1] + ' !important; }'+
            'a, a:link, a:visited { color:' + palette[3] + '; }'+
            'a:hover, a:active { color:' + palette[2] + '; }'+
            '::selection { background-color:' + palette[1] + '; } ::-moz-selection { background-color:' + palette[1] + '; }'+
            '::-webkit-scrollbar-thumb, ::-webkit-scrollbar-button:single-button { background-color:' + palette[1] + '; }'+
            '::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-button:single-button:hover { background-color:' + palette[2] + '; }'+
            '::-webkit-scrollbar-thumb:active, ::-webkit-scrollbar-button:single-button:active { background-color:' + palette[3] + '; }';
    }
  };
 
  var selector = document.createElement('SELECT'),
      picker = document.createElement('INPUT'),
      frag = document.createDocumentFragment(),
      opt,
      color,
      i;
 
  if (!fa_theme_color.palette[fa_theme_color.selected]) {
    for (i in fa_theme_color.palette) {
      fa_theme_color.selected = i;
      my_setcookie('fa_theme_color', i, true);
      break;
    }
  }
 
  selector.id = 'fa_theme_selector';
  selector.onchange = function() {
    fa_theme_color.change(this.value);
  };
 
  picker.id = 'fae_custom-theme';
 
  try {
    picker.type = 'color';
  } catch (error) {
    picker.type = 'text';
  }
 
  picker.value = cc || '#6699CC';
  picker.style.display = my_getcookie('fae_custom-theme') ? '' : 'none';
  picker.onchange = function () {
    fa_theme_color.change('Tema Personalizado');
  };
 
  for (i in fa_theme_color.palette) {
    opt = document.createElement('OPTION');
    color = /Tema Aleatório|Selecionar um tema|Tema Personalizado/.test(i) ? ['#FFF', '#000'] : [fa_theme_color.palette[i][2], ''];
 
    if (!/Tema Aleatório|Selecionar um tema|Tema Personalizado/.test(i)) {
      fa_theme_color.palette['Tema Aleatório'][fa_theme_color.palette['Tema Aleatório'].length] = i;
    }
 
    opt.value = i;
    opt.innerHTML = i;
    opt.selected = fa_theme_color.selected == i ? true : false;
    opt.style.backgroundColor = color[0];
    opt.style.color = color[1];
 
    frag.appendChild(opt);
  }
 
  selector.appendChild(frag);
 
  document.write('<style type="text/css">#fa_theme_selector { color:#FFF; border:1px solid transparent; float:left; outline:none; } #fae_custom-theme { margin:3px; float:left; }</style>');
 
  fa_theme_color.selector = selector;
  fa_theme_color.picker = picker;
  fa_theme_color.change(fa_theme_color.selected);
 
  $(function() {
    var body = document.getElementById('page-body');
    body.insertBefore(picker, body.firstChild);
    body.insertBefore(selector, body.firstChild);
 
    /* THEME CHANGER UI */
    if (fa_theme_color.selector) {
      var frag = document.createDocumentFragment();
 
      // create the theme picker
      window.fae_theme_picker = document.createElement('A');
      fae_theme_picker.href = '#';
      fae_theme_picker.dataset.selectedIndex = fa_theme_color.selector.selectedIndex;
      fae_theme_picker.innerHTML = fa_theme_color.selector.options[fa_theme_color.selector.selectedIndex].innerHTML;
      fae_theme_picker.style.width = fa_theme_color.selector.getBoundingClientRect().width - 12 + 'px';
      fae_theme_picker.style.backgroundColor = fa_theme_color.selector.style.backgroundColor;
      fae_theme_picker.style.borderColor = fa_theme_color.selector.style.borderColor;
      fae_theme_picker.id = 'fae_theme_picker';
      fae_theme_picker.onclick = function () {
        return false;
      };
 
      // show / hide the theme picker on click
      document.addEventListener('click', function (e) {
        var that = e.target;
 
        if (that.id == 'fae_theme_picker') {
 
          if (fae_theme_list.className == 'theme_list_hidden') {
            var offset = that.getBoundingClientRect(),
                selected = fae_theme_list.querySelector('[data-index="' + fae_theme_picker.dataset.selectedIndex + '"]');
 
            fae_theme_list.className = '';
            fae_theme_list.style.left = offset.left + 'px';
            fae_theme_list.style.marginTop = offset.height + 1 + 'px';
 
            fae_hover_theme(selected);
            fae_theme_list.scrollTop = (selected.offsetTop - fae_theme_list.getBoundingClientRect().height) + (selected.getBoundingClientRect().height + 2);
 
          } else {
            fae_theme_list.className = 'theme_list_hidden';
          }
 
        } else if (!fae_theme_list.className) {
          fae_theme_list.className = 'theme_list_hidden';
        }
      });
 
      // change the theme when the up or down arrows are pressed
      fae_theme_picker.onkeydown = function (e) {
        var index = +fae_theme_picker.dataset.selectedIndex;
            next = fae_theme_list.querySelector('[data-index="' + (e.keyCode == 38 ? index - 1 : e.keyCode == 40 ? index + 1 : index) + '"]');
 
        if (next && next.className != 'pseudo-hover') {
          next.click();
          fae_hover_theme(next);
        }
 
        return false;
      };
 
      // hover the selected option / last hovered option
      window.fae_hover_theme = function (that) {
        var hovered = document.querySelector('.pseudo-hover');
 
        if (hovered) {
          hovered.className = '';
        }
 
        that.className = 'pseudo-hover';
      };
 
      // change the theme picker style when the custom theme is changed
      document.getElementById('fae_custom-theme').addEventListener('change', function () {
        fae_theme_picker.style.backgroundColor = fa_theme_color.selector.style.backgroundColor;
        fae_theme_picker.style.borderColor = fa_theme_color.selector.style.borderColor;
      });
 
 
      // create the theme list
      window.fae_theme_list = document.createElement('DIV');
      fae_theme_list.id = 'fae_theme_list';
      fae_theme_list.className = 'theme_list_hidden';
      fae_theme_list.style.width = fa_theme_color.selector.getBoundingClientRect().width + 'px';
 
      // prevent unwanted window scrolling when the theme list has been scrolled all the way from the top or bottom
      fae_theme_list.onwheel = function (e) {
        if ((fae_theme_list.scrollTop == (fae_theme_list.scrollHeight - fae_theme_list.clientHeight) && e.deltaY > 0) || fae_theme_list.scrollTop == 0 && e.deltaY < 0) {
          return false;
        }
      };
 
      // hide the theme list on scroll
      window.addEventListener('scroll', function () {
        if (!fae_theme_list.className) {
          fae_theme_list.className = 'theme_list_hidden';
        }
      });
 
      // get the original theme options and create new options for the updated UI
      for (var opts = fa_theme_color.selector.options, i = 0, j = opts.length, option; i < j; i++) {
        option = document.createElement('A');
        option.href = '#';
        option.dataset.index = i;
        option.innerHTML = opts[i].innerHTML;
        option.style.color = opts[i].style.color || '#FFF';
        option.style.backgroundColor = opts[i].style.backgroundColor;
 
        // apply the selected theme to both the new UI and hidden select element
        option.onclick = function () {
          var color = fa_theme_color.selector.options[this.dataset.index];
 
          color.selected = true;
          fae_theme_picker.innerHTML = fa_theme_color.selector.value;
          fae_theme_picker.dataset.selectedIndex = this.dataset.index;
 
          fa_theme_color.change(color.value);
 
          fae_theme_picker.style.backgroundColor = fa_theme_color.selector.style.backgroundColor;
          fae_theme_picker.style.borderColor = fa_theme_color.selector.style.borderColor;
 
          fae_theme_list.className = 'theme_list_hidden';
          fae_theme_picker.focus();
 
          return false;
        };
 
        // update selected option on hover
        option.onmouseover = function () {
          fae_hover_theme(this);
        };
 
        fae_theme_list.appendChild(option);
      }
 
      // add the theme picker, list, and style to the document
      frag.appendChild(fae_theme_picker);
      frag.appendChild(fae_theme_list);
 
      $('head').append(
        '<style type="text/css">'+
          '#footer_end #fae_theme_list,#page-footer #fae_theme_list{margin-top:-335px!important}'+
          'a#fae_theme_picker{color:#FFF;font-size:13px;font-family:Arial;background:#999;border:1px solid #888;position:relative;display:inline-block;padding:6px;margin:1px;float:left;text-decoration:none;outline:none;}'+
          '#fae_theme_picker:after{content:"\\f0dd";font-family:FontAwesome;position:absolute;right:4px}'+
          '#fae_theme_list{background:#FFF;border:1px solid rgba(0,0,0,.175);position:absolute;max-height:335px;overflow:auto;overflow-x:hidden;z-index:10;white-space:nowrap;visibility:visible}'+
          '#fae_theme_list.theme_list_hidden{visibility:hidden}'+
          '#fae_theme_list a{font-family:Arial;display:block;padding:6px;text-decoration:none}'+
          '#fae_theme_list a.pseudo-hover{color:#FFF!important;background:#28F!important}'+
          '@media (max-width: 768px) and (min-width: 0px) {body #fae_theme_picker{float:right;width:240px !important;margin:0 0 6px}body #fae_theme_list{width:252px !important}}'+
        '</style>'
      );
 
      fa_theme_color.selector.parentNode.insertBefore(frag, fa_theme_color.selector);
      fa_theme_color.selector.style.display = 'none'; // hide to original theme selector element
    }
 
  });
}());
 
function fae_editColor (str, op) {
  var letter = { 'F' : 15, 'E' : 14, 'D' : 13, 'C' : 12, 'B' : 11, 'A' : 10 },
      hex = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B', 'C', 'D', 'E', 'F'],
      neg = [0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6];
 
  str = str.toUpperCase().split('');
 
  for (var i = 1; i < 7; i++) {
    if (letter[str[i]]) {
      str[i] = letter[str[i]];
    } else {
      str[i] = +str[i];
    }
 
    if (op == 'darken') {
      str[i] = neg[str[i]];
    } else {
      str[i] += op;
    }
 
    if (str[i] > 15) {
      str[i] = 15;
    } else if (str[i] < 0) {
      str[i] = 0;
    }
 
    str[i] = hex[str[i]];
  }
 
  return str.join('');
};
 
 
/* -- 03. pseudoInputs -- */
// function to hide all checkboxes / radios and replace them with pseudo inputs
$(function() {
  for (var input = document.getElementsByTagName('INPUT'), i = 0, j = input.length, type; i < j; i++) {
    type = input[i].type;
    if (/radio|checkbox/i.test(type)) {
      input[i].className += ' fa_input_hidden';
      input[i].insertAdjacentHTML('afterend', '<span class="fa_pseudo_' + type + '" onclick="this.previousSibling.click(); return false;"/>');
    }
  }
});
 
 
/* -- 04. toolbar search mod -- */
// gives the search bar a placeholder and attaches an event handler to the button
window.fa_textarea_placeholer = 'Buscar...';
 
$(function(){
  $(function() {
    var fa_magnifier = document.getElementById('fa_magnifier'),
        fa_textarea = document.getElementById('fa_textarea');
 
    if (fa_magnifier) {
      fa_magnifier.onclick = function() {
        this.parentNode.submit();
      };
    }
 
    if (fa_textarea) {
      fa_textarea.value = fa_textarea_placeholer;
 
      fa_textarea.onfocus = function() {
        if (this.value == fa_textarea_placeholer) {
          this.value = '';
        }
      };
 
      fa_textarea.onblur = function() {
        if (!this.value) {
          this.value = fa_textarea_placeholer;
        }
      };
 
    }
 
  });
});
 
 
/* -- 05. fae_sticky_nav_panel -- */
// adds a sticky navigation for quick use when the navbar isn't visible
$(function() {
  window.fae_sticky = {
            // various user options
            navbar : 'navbar',
          position : 'right',
            title : 'Navegação Rápida',
          tooltip : 'Alternar Navegação Rápida',
    additionalHTML : '<div class="nav-actions"><a href="javascript:fae_sticky.copyURL();" title="Copiar BBCode URL"><i class="fa fa-link"></i></a>' + ( _userdata.user_level == 1 ? '<a href="/admin" title="Painel Admin"><i class="fa fa-wrench"></i></a>' : '' ) + '<a href="#top" title="Início da Página"><i class="fa fa-chevron-up"></i></a><a href="#bottom" title="Fim da Página"><i class="fa fa-chevron-down"></i></a></div>',
    alwaysVisible : false,
 
    // copy page URL as bbcode
    copyURL : function() {
      window.prompt('Copiar o BBCode URL abaixo. (CTRL+C)', '[url=' + window.location + ']' + document.title + '[/url]');
    },
 
    // listen for changes in the navbar's bottom rect
    scroll : function() {
      var rect = fae_sticky.navbar.getBoundingClientRect(),
          position = fae_sticky.node[0].style[fae_sticky.position];
 
      if (rect.bottom <= fae_sticky.offset[fae_sticky.tb_state] && position == '-30px') {
        fae_sticky.node[0].style[fae_sticky.position] = '';
      } else if (rect.bottom > fae_sticky.offset[fae_sticky.tb_state] && position != '-30px') {
        fae_sticky.node[0].style[fae_sticky.position] = '-30px';
        $(fae_sticky.node).removeClass('active');
      }
    },
 
    // offsets for when the toolbar is hidden / shown
    offset : {
      fa_hide : 0,
      fa_show : 30
    }
  };
 
  // nodes used in the module
  fae_sticky.node = [
    // button
    $('<a class="widget_menu column_button_' + fae_sticky.position + ' color-secondary" />').attr({
      href : '#',
        id : 'fa_sticky_nav_button',
      style : fae_sticky.position + ':-30px;',
      title : fae_sticky.tooltip
 
    }).click(function() {
      $(fae_sticky.node)[/active/.test(this.className) ? 'removeClass' : 'addClass']('active');
      return false;
    })[0],
 
    // panel
    $('<div id="fae_sticky_nav_panel" class="module_column column_' + fae_sticky.position + ' color-secondary" />')
    .html('<div class="title module_column_title">' + fae_sticky.title + '</div><div class="module_inner"></div>')[0]
  ];
 
  fae_sticky.navbar = document.getElementById(fae_sticky.navbar); // get the old navbar
 
  // then clone its contents and add it to the sticky panel
  $('.module_inner', fae_sticky.node[1]).append($('a.mainmenu', fae_sticky.navbar).clone()).append(fae_sticky.additionalHTML);
  $(document.body).append(fae_sticky.node);
 
  if (!fae_sticky.alwaysVisible) {
    fae_sticky.tb_state = my_getcookie('toolbar_state') || (_userdata.activate_toolbar ? 'fa_show' : 'fa_hide');
    fae_sticky.scroll();
 
    $(window).scroll(fae_sticky.scroll);
 
    $(function() {
      $('#fa_hide, #fa_show').click(function() {
        fae_sticky.tb_state = this.id;
      });
    });
  } else {
    fae_sticky.node[0].style[fae_sticky.position] = '';
  }
});
 
 
/* -- 06. image resizer -- */
(function() {
  window.fa_img_resizer = {
    max_width : 400, // maximum image width (400px)
    max_height : 250, // maximum image height (250px)
 
    selector : '.postbody .content img, .mod_news img, .message-text img', // where images should be resized
 
    options : {
            bar : true, // resized image options bar
        toggler : true, // Enlarge / Reduce Image
      full_size : true, // Mostrar tamanho grande
      download : false, // Baixar imagem link
      lightbox : true // lightbox effect
    },
 
    // texts
    lang : {
      full_size : '<i class="fa fa-external-link"></i> Mostrar tamanho grande',
        enlarge : '<i class="fa fa-search-plus"></i> Aumentar imagem',
        reduce : '<i class="fa fa-search-minus"></i> Reduzir imagem',
      download : '<i class="fa fa-download"></i> Baixar imagem',
      tooltip : 'Clique para ver imagem completa'
    },
 
    // resize all images inside the "resizeIn" elements
    resize : function() {
      for (var a = $(fa_img_resizer.selector), i = 0, j = a.length; i < j; i++) {
        if (!a[i].alt && (a[i].naturalWidth > fa_img_resizer.max_width || a[i].naturalHeight > fa_img_resizer.max_height)) {
          a[i].className += ' fa_img_reduced';
 
          // make the image a "link" if it's not wrapper with one
          if (fa_img_resizer.options.lightbox && a[i].parentNode.tagName != 'A') {
            a[i].style.cursor = 'pointer';
            a[i].title = fa_img_resizer.lang.tooltip;
 
            a[i].onclick = function() {
              fa_img_resizer.lightbox(this);
            };
          }
 
          // create the resize bar
          if (fa_img_resizer.options.bar) {
            (a[i].parentNode.tagName == 'A' ? a[i].parentNode : a[i]).insertAdjacentHTML('beforebegin',
              '<div class="fa_img_resizer" style="width:' + (a[i].width - 8) + 'px;">'+
                (fa_img_resizer.options.toggler ? '<a class="fa_img_enlarge" href="#" onclick="fa_img_resizer.toggle(this); return false;">' + fa_img_resizer.lang.enlarge + '</a>' : '')+
                (fa_img_resizer.options.full_size ? '<a class="fa_img_full" href="/viewimage.forum?u=' + a[i].src + '" target="_blank">' + fa_img_resizer.lang.full_size + '</a>' : '')+
                (fa_img_resizer.options.download && !/Firefox/.test(navigator.userAgent) && 'download' in document.createElement('A') ? '<a class="fa_img_download" href="' + a[i].src + '" target="_blank" download>' + fa_img_resizer.lang.download + '</a>' : '' )+
              '</div>'
            );
          }
        }
      }
    },
 
    // toggle between enlarged and reduced image sizes
    toggle : function(that) {
      var img = that.parentNode.nextSibling;
 
      if (img.tagName == 'A') {
        img = img.getElementsByTagName('IMG')[0];
      }
 
      if (/fa_img_reduced/.test(img.className)) {
        that.innerHTML = fa_img_resizer.lang.reduce;
        that.className = 'fa_img_reduce';
        img.className = img.className.replace(/fa_img_reduced/, 'fa_img_enlarged');
      } else {
        that.innerHTML = fa_img_resizer.lang.enlarge;
        that.className = 'fa_img_enlarge';
        img.className = img.className.replace(/fa_img_enlarged/, 'fa_img_reduced');
      }
 
      that.parentNode.style.width = img.width - 8 + 'px';
    },
 
    // lightbox effect
    lightbox : function(that) {
      var frag = document.createDocumentFragment(),
          overlay = $('<div id="fa_img_lb_overlay" />')[0],
          img = $('<img id="fa_img_lb_image" src="' + that.src + '" />')[0];
 
      overlay.onclick = fa_img_resizer.kill_lightbox;
      img.onclick = fa_img_resizer.kill_lightbox;
 
      frag.appendChild(overlay);
      frag.appendChild(img);
      document.body.appendChild(frag);
      document.body.style.overflow = 'hidden';
 
      img.style.marginTop = '-' + (img.height / 2) + 'px';
      img.style.marginLeft = '-' + (img.width / 2) + 'px';
    },
 
    // kill the lightbox
    kill_lightbox : function() {
      var overlay = document.getElementById('fa_img_lb_overlay'),
          img = document.getElementById('fa_img_lb_image');
 
      overlay && document.body.removeChild(overlay);
      img && document.body.removeChild(img);
      document.body.style.overflow = '';
    }
  };
 
  // write styles into the document head
  document.write(
    '<style type="text/css">'+
      fa_img_resizer.selector + ', .fa_img_reduced { max-width:' + fa_img_resizer.max_width + 'px; max-height:' + fa_img_resizer.max_height + 'px; }'+
      '.fa_img_enlarged { max-width:100% !important; max-height:100% !important; }'+
      '.fa_img_resizer { font-size:12px; text-align:left; padding:3px; margin:3px 0; background:#FFF; border:1px solid #CCC; }'+
      '.fa_img_resizer a { display:inline-block; margin:0 3px; }'+
      '.fa_img_resizer i { font-size:14px; vertical-align:middle; }'+
      '#fa_img_lb_overlay { background:rgba(0, 0, 0, 0.7); position:fixed; top:0; right:0; bottom:0; left:0; z-index:999999; cursor:pointer; }'+
      '#fa_img_lb_image { max-height:100%; max-width:100%; position:fixed; left:50%; top:50%; z-index:9999999; cursor:pointer; }'+
    '</style>'
  );
 
  // begin modifying images when the page is loaded
  $(window).load(fa_img_resizer.resize);
 
  // kill forumactif's image resizer
  if (window.resize_images) {
    window.resize_images = function() {
      return false;
    };
  }
}());
 
 
/* -- 07. fae_toggle_category -- */
function fae_toggle_category(that) {
  var next = that.nextSibling;
  that.className = 'title ';
 
  if (next.style.display == 'none') {
    next.style.display = '';
    that.className += 'c_hide';
    my_setcookie('fae_' + next.id, 'shown');
  } else {
    next.style.display = 'none';
    that.className += 'c_show';
    my_setcookie('fae_' + next.id, 'hidden');
  }
};
 
 
/* -- 08. sticky_nav_notifications -- */
$(function() {
  if (_userdata.session_logged_in) {
    var nav = document.getElementById('fae_sticky_nav_panel'),
        a = $('<a class="mainmenu" href="/profile?mode=editprofile&page_profil=notifications">Notificações</a>')[0];
 
    if (nav) {
      $('a[href="/privmsg?folder=inbox"]', nav).after(a);
 
      $.get('/notification.forum', function(o) {
        if (o && o.unread) {
          a.insertAdjacentHTML('beforeend', ' <span id="sticky_notif_unread">(' + o.unread + ')</span>');
        }
      }, 'json');
    }
  }
});
 
 
/* -- 09. update_notifier -- */
$(function() {
  if (_userdata.user_id == 1 && !my_getcookie('fae_update_alerted')) {
 
    $.get('https://raw.githubusercontent.com/SethClydesdale/forumactif-edge/master/javascripts/version-data.js', function(d) {
      var script = document.createElement('SCRIPT');
      script.type = 'text/javascript';
      script.text = d.replace(/forumactif_edge_version_data/, 'fae_github_version_data');
      document.body.appendChild(script);
 
      if (forumactif_edge_version_data.length < fae_github_version_data.length) {
        alert('An update has been found for Forumactif Edge. When you\'re ready, please proceed to your FAE Control Panel and click "Check for updates" to begin the update process.');
      }
 
      my_setcookie('fae_update_alerted', '1');
    });
 
  }
});
 
 
/* -- 10. topic_icon_formatter -- */
$(function() {
  var a = $('.forum-info[style*="background-image"]'),
      i = 0,
      j = a.length;
 
  if (j) {
    for (; i < j; i++) {
      a[i].insertAdjacentHTML('afterbegin', '<img class="topic-icon" src="' + a[i].style.backgroundImage.replace(/.*?url\((.*?)\).*/, '$1').replace(/'|"/g, '') + '" />');
      a[i].style.backgroundImage = '';
    }
 
    $('head').append('<style type="text/css">.topic-icon{vertical-align:middle;margin:0 3px;}</style>');
  }
});
 
 
/* -- 11. dark mode -- */
(function() {
  window.fae_lightSwitchMode = my_getcookie('fae_light-switch-mode') || 'dark';
 
  document.write('<style type="text/css">#fae_light-switch-container{margin:6px 0}#fae_light-switch-label{font-weight:700;vertical-align:middle}#fae_light-switch{background-color:rgba(0,0,0,.25);vertical-align:middle;display:inline-block;position:relative;height:26px;width:56px;border-radius:20px;cursor:pointer;overflow:hidden}#fae_light-switch>input{display:none}#fae_light-switch>div{background-color:rgba(255,255,255,.5);position:absolute;top:3px;left:3px;height:20px;width:20px;border-radius:20px;transition:.4s;font-size:13px;font-weight:700;line-height:22px}#fae_light-switch>div:before{content:"ON";margin-left:-24px;color:transparent;transition:.4s}#fae_light-switch>div:after{content:"OFF";margin-left:30px;color:rgba(255,255,255,.5);transition:.4s}#fae_light-switch>input:checked+div{background-color:#FFF;left:33px}#fae_light-switch>input:checked+div:before{color:#FFF}#fae_light-switch>input:checked+div:after{color:transparent}</style>');
 
  var footer = '.footer-links.left',
 
      cookie = my_getcookie('fae_light-switch'),
      rgb,
      button,
      container,
 
      changeTheme = function (cookie) {
        var button = document.querySelector('#fae_light-switch input');
 
        if ((button && button.checked) || cookie == 'on') {
          my_setcookie('fae_light-switch', 'on', true);
 
          if (window.sessionStorage && window.sessionStorage.faeLightSwitch) {
            $('head').append('<style type="text/css" id="fae_light-switch-css">' + window.sessionStorage.faeLightSwitch + '</style>');
          } else {
            $.get('https://raw.githubusercontent.com/SethClydesdale/forumactif-edge/master/css/dark-mode/' + fae_lightSwitchMode + '-mode.min.css', function (d) {
              $('head').append('<style type="text/css" id="fae_light-switch-css">' + d + '</style>');
 
              if (window.sessionStorage) {
                window.sessionStorage.faeLightSwitch = d;
              }
            });
          }
 
        } else {
          var css = document.getElementById('fae_light-switch-css');
 
          my_setcookie('fae_light-switch', 'off', true);
 
          if (css) {
            document.head.removeChild(css);
          }
        }
      };
 
  cookie && changeTheme(cookie);
 
  $(function() {
    if (!my_getcookie('fae_light-switch-mode')) {
      rgb = window.getComputedStyle(document.body, null).getPropertyValue('background-color').replace(/rgb\(|\)|\s/g, '').split(',');
      fae_lightSwitchMode = Math.round(((parseInt(rgb[0]) * 299) + (parseInt(rgb[1]) * 587) + (parseInt(rgb[2]) * 114)) /1000) > 125 ? 'dark' : 'light';
 
      my_setcookie('fae_light-switch-mode', fae_lightSwitchMode, true);
    }
 
    footer = document.querySelector(footer);
 
    if (footer) {
      button = document.createElement('LABEL');
      button.id = 'fae_light-switch';
      button.innerHTML = '<input type="checkbox" ' + (cookie == 'on' ? 'checked="true"' : '') + '/><div></div>';
      button.firstChild.onchange = changeTheme;
 
      container = document.createElement('DIV');
      container.id = 'fae_light-switch-container';
      container.innerHTML = '<span id="fae_light-switch-label">' + (fae_lightSwitchMode == 'dark' ? 'Modo Escuro:' : 'Modo Claro:') + '</span>';
 
      container.appendChild(button);
      footer.appendChild(container);
    }
  });
}());
 
 
/* -- 12. copy code button -- */
$.getScript('https://cdn.jsdelivr.net/clipboard.js/1.5.16/clipboard.min.js', function() {
  window.fae_copyCode = {
    copy : 'Copiar Código',
    copied : 'Copiado!'
  };
 
  $(function() {
    var a = $('.codebox dt').not('.spoiler > dt, .hidecode > dt'),
        i = 0,
        j = a.length;
 
    if (a[0]) {
      $('head').append('<style type="text/css">.fae_copy-code{float:right;cursor:pointer}.fae_copy-code:before{content:"\\f0ea";font-size:13px;font-family:FontAwesome;text-align:center;color:#69C;background:#FFF;border-radius:100%;display:inline-block;width:19px;height:19px;line-height:19px;margin:-1px 3px 0 3px}.codebox .fae_copy-code:hover:before{color:#EB5}.codebox .fae_copy-code.fae_copied:before{content:"\\f00c";font-weight:700;color:#8B5}</style>');
 
      for (; i < j; i++) {
        a[i].insertAdjacentHTML('beforeend', '<span class="fae_copy-code">' + fae_copyCode.copy + '</span>');
      }
 
      new Clipboard('.fae_copy-code',{
        target : function (copy) {
          if (copy.innerHTML != fae_copyCode.copied) {
            return $(copy).closest('.codebox').find('code')[0];
          }
        }
      }).on('success', function (e) {
        var copy = e.trigger;
 
        if (copy.innerHTML != fae_copyCode.copied) {
          copy.innerHTML = fae_copyCode.copied;
          copy.className += ' fae_copied';
 
          window.setTimeout(function() {
            copy.innerHTML = fae_copyCode.copy;
            copy.className = copy.className.replace('fae_copied', '');
          }, 1000);
        }
 
        e.clearSelection();
      });
    }
 
  });
});
 
 
 
/* -- 13. local frame styler -- */
// global function for getting local iframes
function fae_styleLocalFrames () {
  var frame = $('iframe[src^="/"], object[data^="/"]'),
      i = 0,
      j = frame.length;
 
  for (; i < j; i++) {
    try {
      var head = $('head', frame[i].contentDocument || frame[i].contentWindow.document);
 
      $('#fa_theme_style, #fae_light-switch-css', head).remove();
      head.append($('#fa_theme_style, #fae_light-switch-css').clone());
 
    } catch (error) {
      window.console && console.log(error);
    }
  }
 
};
 
 
// waits for frames to load (such as chatbox and smilies) and then applies preferred styles to them
$(window).load(function() {
  fae_styleLocalFrames();
  $('iframe[src^="/"]').on('load', fae_styleLocalFrames);
  $('object[data^="/"]').attr('onload', 'fae_styleLocalFrames();');
  $('#fae_custom-theme, #fa_theme_selector, #fae_light-switch input').on('change', fae_styleLocalFrames);
});

Ketholy

Ketholy
Membro do Fórum

Feminino
Inscrito dia : 20/01/2017
Mensagens : 1297
Pontos Ativos : 1558

Ver perfil do usuário http://jogosrpg-com-br.forumais.com/forum http://assuntosgeral-com-br.forumais.com https://twitter.com/Ketholy Suan

Atendido / Resolvido Re: Widgets no fórum

Mensagem por RafaelS. em 28.12.18 16:40

Olá @Ketholy,

Então resumindamente, você quer os widgets como são por padrão?
Exemplo: link (externo).

Fico no aguardo.




Eu sou o RafaelS.,
Eu aconselho-lhe ler os seguintes tópicos:

Seta Para evitar ser punido é importante que leia  o regulamento geral do Fórum dos fóruns.
Seta Antes de criar o seu pedido de suporte certifique-se de ler o regulamento da seção de suporte.
Seta Quando for criar o seu tópico tente ser o mais específico possível, para que nós possámos entender!

"Suba na vida, mas não faça de seus amigos os degraus de sua escada, vença pela sua capacidade sempre com Honestidade,Caráter e Amor!"

Widgets no fórum 2169
Widgets no fórum 15074
RafaelS.

RafaelS.
Moderadeiro
Moderadeiro

Masculino
Inscrito dia : 26/04/2014
Mensagens : 4695
Pontos Ativos : 5747

Ver perfil do usuário http://techmais.forumeiros.com/

Atendido / Resolvido Re: Widgets no fórum

Mensagem por Ketholy em 28.12.18 17:13

@RafaelS. escreveu:Olá @Ketholy,

Então resumindamente, você quer os widgets como são por padrão?
Exemplo: link (externo).

Fico no aguardo.

Exato Envergonhado
Ketholy

Ketholy
Membro do Fórum

Feminino
Inscrito dia : 20/01/2017
Mensagens : 1297
Pontos Ativos : 1558

Ver perfil do usuário http://jogosrpg-com-br.forumais.com/forum http://assuntosgeral-com-br.forumais.com https://twitter.com/Ketholy Suan

Atendido / Resolvido Re: Widgets no fórum

Mensagem por RafaelS. em 28.12.18 18:11

Ah ok, não tinha entendido isso haha!
Nesse caso basta desativar o script que colocou no seu fórum. O script começa da seguinte forma:

Código:
window.forumactif_edge_version_data=['1.0.0-beta'

Até mais. Feliz




Eu sou o RafaelS.,
Eu aconselho-lhe ler os seguintes tópicos:

Seta Para evitar ser punido é importante que leia  o regulamento geral do Fórum dos fóruns.
Seta Antes de criar o seu pedido de suporte certifique-se de ler o regulamento da seção de suporte.
Seta Quando for criar o seu tópico tente ser o mais específico possível, para que nós possámos entender!

"Suba na vida, mas não faça de seus amigos os degraus de sua escada, vença pela sua capacidade sempre com Honestidade,Caráter e Amor!"

Widgets no fórum 2169
Widgets no fórum 15074
RafaelS.

RafaelS.
Moderadeiro
Moderadeiro

Masculino
Inscrito dia : 26/04/2014
Mensagens : 4695
Pontos Ativos : 5747

Ver perfil do usuário http://techmais.forumeiros.com/

Atendido / Resolvido Re: Widgets no fórum

Mensagem por Ketholy em 28.12.18 19:17

@RafaelS. escreveu:Ah ok, não tinha entendido isso haha!
Nesse caso basta desativar o script que colocou no seu fórum. O script começa da seguinte forma:

Código:
window.forumactif_edge_version_data=['1.0.0-beta'

Até mais. Feliz

Tirei, mais não mudou em nada.
Ketholy

Ketholy
Membro do Fórum

Feminino
Inscrito dia : 20/01/2017
Mensagens : 1297
Pontos Ativos : 1558

Ver perfil do usuário http://jogosrpg-com-br.forumais.com/forum http://assuntosgeral-com-br.forumais.com https://twitter.com/Ketholy Suan

Atendido / Resolvido Re: Widgets no fórum

Mensagem por RafaelS. em 31.12.18 17:22

Olá @Ketholy,

Tente adicionar este código à sua folha de estilos (CSS):
Código:
.widget_menu, .module_column_title { display:none; }
#fa_sticky_nav_button { display:block; }
 
#right .module_inner { position:static; }
#right {
  position:static;
  float:left;
  margin-left:6px;
  background:none;
}
 
#content { margin-right:306px; }
#main {
  width:100%;
  float:left;
}

Até mais. Feliz




Eu sou o RafaelS.,
Eu aconselho-lhe ler os seguintes tópicos:

Seta Para evitar ser punido é importante que leia  o regulamento geral do Fórum dos fóruns.
Seta Antes de criar o seu pedido de suporte certifique-se de ler o regulamento da seção de suporte.
Seta Quando for criar o seu tópico tente ser o mais específico possível, para que nós possámos entender!

"Suba na vida, mas não faça de seus amigos os degraus de sua escada, vença pela sua capacidade sempre com Honestidade,Caráter e Amor!"

Widgets no fórum 2169
Widgets no fórum 15074
RafaelS.

RafaelS.
Moderadeiro
Moderadeiro

Masculino
Inscrito dia : 26/04/2014
Mensagens : 4695
Pontos Ativos : 5747

Ver perfil do usuário http://techmais.forumeiros.com/

Atendido / Resolvido Re: Widgets no fórum

Mensagem por Ketholy em 31.12.18 17:37

Resolvido!

Muito obrigada @RafaelS Piscada
Ketholy

Ketholy
Membro do Fórum

Feminino
Inscrito dia : 20/01/2017
Mensagens : 1297
Pontos Ativos : 1558

Ver perfil do usuário http://jogosrpg-com-br.forumais.com/forum http://assuntosgeral-com-br.forumais.com https://twitter.com/Ketholy Suan

Atendido / Resolvido Re: Widgets no fórum

Mensagem por Roger123 em 31.12.18 17:44

Tópico resolvido


Movido para "Questões resolvidas".


Seja bem-vindo ao Fórum dos Fóruns!
Veja aqui alguns links importantes a saber:



Roger123 - Ajudeiro

Widgets no fórum Pmb0kx10
Roger123

Roger123
Ajudeiro
Ajudeiro

Masculino
Inscrito dia : 30/06/2018
Mensagens : 1423
Pontos Ativos : 1711

Ver perfil do usuário https://ajuda.forumeiros.com

Ver o tópico anterior Ver o tópico seguinte Voltar ao Topo


Permissão deste fórum:
Você não pode responder aos tópicos neste fórum