{"version":3,"names":["squizAPI","require","default","withPluginApi","api","onPageChange","checkWhatFunctionsToRun","bodyClass","$","attr","indexOf","runMatrixForumFunctions","console","log","length","before"],"sources":["theme-2-inline-common-body_tag.js"],"sourcesContent":["\n//By Bart Sep 2016\n//custom scripts to change the interface at certain events\n\n//first register the API\nvar squizAPI = require('discourse/lib/plugin-api').default;\nsquizAPI.withPluginApi('0.1', api => {\n    //when the page changes, run some functions\n    api.onPageChange(() => checkWhatFunctionsToRun());\n});\n\n//function to check what functions should run depending on what screen we are on within the site\nfunction checkWhatFunctionsToRun(){\n    //if we are in the matrix section, run matrix functions\n    var bodyClass = $('body').attr('class');\n    if(bodyClass.indexOf('category-matrix') > -1){\n        //in matrix\n        runMatrixForumFunctions();\n    }\n}\n\n//functions to run if we are in the /matrix section\nfunction runMatrixForumFunctions(){\n    console.log('In Matrix');\n    if($('.matrix-menu-wrapper').length < 1){\n        $('.category-heading').before(''+\n            '<div class=\"matrix-menu-wrapper\">'+\n                '<a href=\"https://matrix.squiz.net/\" target=\"_blank\" class=\"btn community-btn\">Matrix Community Website &nbsp; <i class=\"fa fa-share\" aria-hidden=\"true\"></i></a>'+\n            '</div>'+\n        '');\n    }\n}\n\n"],"mappings":"AACA;AACA;;AAEA;AACA,IAAIA,QAAQ,GAAGC,OAAO,CAAC,0BAA0B,CAAC,CAACC,OAAO;AAC1DF,QAAQ,CAACG,aAAa,CAAC,KAAK,EAAEC,GAAG,IAAI;EACjC;EACAA,GAAG,CAACC,YAAY,CAAC,MAAMC,uBAAuB,CAAC,CAAC,CAAC;AACrD,CAAC,CAAC;;AAEF;AACA,SAASA,uBAAuBA,CAAA,EAAE;EAC9B;EACA,IAAIC,SAAS,GAAGC,CAAC,CAAC,MAAM,CAAC,CAACC,IAAI,CAAC,OAAO,CAAC;EACvC,IAAGF,SAAS,CAACG,OAAO,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,EAAC;IACzC;IACAC,uBAAuB,CAAC,CAAC;EAC7B;AACJ;;AAEA;AACA,SAASA,uBAAuBA,CAAA,EAAE;EAC9BC,OAAO,CAACC,GAAG,CAAC,WAAW,CAAC;EACxB,IAAGL,CAAC,CAAC,sBAAsB,CAAC,CAACM,MAAM,GAAG,CAAC,EAAC;IACpCN,CAAC,CAAC,mBAAmB,CAAC,CAACO,MAAM,CAAC,EAAE,GAC5B,mCAAmC,GAC/B,kKAAkK,GACtK,QAAQ,GACZ,EAAE,CAAC;EACP;AACJ","ignoreList":[]}