iamroose / POE Trade Center

// ==UserScript==
// @name          POE Trade Center
// @namespace     poetradecenter
// @version       1.0.6
// @description   Center search windows
// @author        iamroose
// @license       MIT
// @match         https://www.pathofexile.com/trade*
// @grant         none
// @run-at        document-start
// ==/UserScript==

(function () {
  install();

  function install() {
      document.addEventListener('DOMContentLoaded', function(){
          addStyles();
      }, false);
  }

    // Add some styles
  function addStyles() {
    var css = "#trade {max-width:920px;} .search-advanced-items {display:flex; flex-direction:column; margin-bottom: 20px;} .search-advanced-pane {width:100% !important; margin-bottom:20px;}";
      var style = document.createElement("style");
      style.type = "text/css";
      if (style.styleSheet){
          style.styleSheet.cssText = css;
      } else {
          style.appendChild(document.createTextNode(css));
      }

      document.documentElement.appendChild(style);
  }

})();