diff --git a/.gitignore b/.gitignore index 172a6a08..50f0a97a 100644 --- a/.gitignore +++ b/.gitignore @@ -21,9 +21,10 @@ gulp/res/js/locals.js gulp/res/js/post.js gulp/res/js/modal.js gulp/res/js/captchaformsection.js -gulp/res/js/pugfiulters.js +gulp/res/js/pugfilters.js gulp/res/js/threadwatcher.js gulp/res/js/watchedthread.js +gulp/res/js/uploaditem.js gulp/res/js/socket.io.js # some ide and testing files, artefacts, etc diff --git a/gulp/res/js/pugfilters.js b/gulp/res/js/pugfilters.js deleted file mode 100644 index 3cf8fd12..00000000 --- a/gulp/res/js/pugfilters.js +++ /dev/null @@ -1,38 +0,0 @@ -function pug_attr(t,e,n,r){if(!1===e||null==e||!e&&("class"===t||"style"===t))return"";if(!0===e)return" "+(r?t:t+'="'+t+'"');var f=typeof e;return"object"!==f&&"function"!==f||"function"!=typeof e.toJSON||(e=e.toJSON()),"string"==typeof e||(e=JSON.stringify(e),n||-1===e.indexOf('"'))?(n&&(e=pug_escape(e))," "+t+'="'+e+'"'):" "+t+"='"+e.replace(/'/g,"'")+"'"} -function pug_escape(e){var a=""+e,t=pug_match_html.exec(a);if(!t)return e;var r,c,n,s="";for(r=t.index,c=0;r]/;function filters(locals) {var pug_html = "", pug_mixins = {}, pug_interp;; - var locals_for_with = (locals || {}); - - (function (filterArr) { - pug_mixins["filters"] = pug_interp = function(filterArr){ -var block = (this && this.block), attributes = (this && this.attributes) || {}; -const filterTypeMap = { single: 'Single', fid: 'ID', fname: 'Name', ftrip: 'Tripcode', fnamer: 'Name', ftripr: 'Tripcode', fsub: 'Subject', fsubr: 'Subject', fmsg: 'Message', fmsgr: 'Message' } -if (filterArr.length > 0) { -// iterate filterArr -;(function(){ - var $$obj = filterArr; - if ('number' == typeof $$obj.length) { - for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) { - var filter = $$obj[pug_index0]; -pug_html = pug_html + "\u003Ctr\u003E\u003Ctd\u003E" + (pug_escape(null == (pug_interp = filterTypeMap[filter.type]) ? "" : pug_interp)) + "\u003C\u002Ftd\u003E\u003Ctd\u003E" + (pug_escape(null == (pug_interp = filter.val.toString()) ? "" : pug_interp)) + "\u003C\u002Ftd\u003E\u003Ctd\u003E\u003Cinput" + (pug_attr("disabled", true, true, false)+" type=\"checkbox\""+pug_attr("checked", filter.type.endsWith('r'), true, false)) + "\u002F\u003E\u003C\u002Ftd\u003E\u003Ctd\u003E\u003Ca" + (" class=\"right close\""+pug_attr("data-type", filter.type, true, false)+pug_attr("data-data", filter.val, true, false)) + "\u003E×\u003C\u002Fa\u003E\u003C\u002Ftd\u003E\u003C\u002Ftr\u003E"; - } - } else { - var $$l = 0; - for (var pug_index0 in $$obj) { - $$l++; - var filter = $$obj[pug_index0]; -pug_html = pug_html + "\u003Ctr\u003E\u003Ctd\u003E" + (pug_escape(null == (pug_interp = filterTypeMap[filter.type]) ? "" : pug_interp)) + "\u003C\u002Ftd\u003E\u003Ctd\u003E" + (pug_escape(null == (pug_interp = filter.val.toString()) ? "" : pug_interp)) + "\u003C\u002Ftd\u003E\u003Ctd\u003E\u003Cinput" + (pug_attr("disabled", true, true, false)+" type=\"checkbox\""+pug_attr("checked", filter.type.endsWith('r'), true, false)) + "\u002F\u003E\u003C\u002Ftd\u003E\u003Ctd\u003E\u003Ca" + (" class=\"right close\""+pug_attr("data-type", filter.type, true, false)+pug_attr("data-data", filter.val, true, false)) + "\u003E×\u003C\u002Fa\u003E\u003C\u002Ftd\u003E\u003C\u002Ftr\u003E"; - } - } -}).call(this); - -} -else { -pug_html = pug_html + "\u003Ctd colspan=\"4\"\u003ENo Filters\u003C\u002Ftd\u003E"; -} -}; -pug_mixins["filters"](filterArr); - }.call(this, "filterArr" in locals_for_with ? - locals_for_with.filterArr : - typeof filterArr !== 'undefined' ? filterArr : undefined)); - ;;return pug_html;} \ No newline at end of file diff --git a/gulp/res/js/uploaditem.js b/gulp/res/js/uploaditem.js deleted file mode 100644 index fa45176e..00000000 --- a/gulp/res/js/uploaditem.js +++ /dev/null @@ -1,26 +0,0 @@ -function pug_attr(t,e,n,r){if(!1===e||null==e||!e&&('class'===t||'style'===t))return'';if(!0===e)return' '+(r?t:t+'="'+t+'"');var f=typeof e;return'object'!==f&&'function'!==f||'function'!=typeof e.toJSON||(e=e.toJSON()),'string'==typeof e||(e=JSON.stringify(e),n||-1===e.indexOf('"'))?(n&&(e=pug_escape(e)),' '+t+'="'+e+'"'):' '+t+'=\''+e.replace(/'/g,''')+'\'';} -function pug_escape(e){var a=''+e,t=pug_match_html.exec(a);if(!t)return e;var r,c,n,s='';for(r=t.index,c=0;r]/;function uploaditem(locals) {var pug_html = '', pug_mixins = {}, pug_interp; - var locals_for_with = (locals || {}); - - (function (uploaditem) { - pug_mixins['uploaditem'] = pug_interp = function(item){ - var block = (this && this.block), attributes = (this && this.attributes) || {}; - pug_html = pug_html + '\u003Cdiv\u003E\u003Cdiv class="upload-item"\u003E\u003Cimg' + (' class="upload-thumb"'+pug_attr('src', item.url, true, false)) + '\u002F\u003E\u003Cp\u003E' + (pug_escape(null == (pug_interp = item.name) ? '' : pug_interp)) + '\u003C\u002Fp\u003E\u003Ca class="close"\u003E×\u003C\u002Fa\u003E\u003C\u002Fdiv\u003E'; - if (item.hash) { - pug_html = pug_html + '\u003Cdiv class="row sb"\u003E'; - if (item.spoilers) { - pug_html = pug_html + '\u003Clabel\u003E\u003Cinput' + (' type="checkbox" name="spoiler"'+pug_attr('value', item.hash, true, false)) + '\u002F\u003ESpoiler\u003C\u002Flabel\u003E'; - } - if (item.stripFilenames) { - pug_html = pug_html + '\u003Clabel\u003E\u003Cinput' + (' type="checkbox" name="strip_filename"'+pug_attr('value', item.hash, true, false)) + '\u002F\u003EStrip Filename\u003C\u002Flabel\u003E'; - } - pug_html = pug_html + '\u003C\u002Fdiv\u003E'; - } - pug_html = pug_html + '\u003C\u002Fdiv\u003E'; - }; - pug_mixins['uploaditem'](uploaditem); - }.call(this, 'uploaditem' in locals_for_with ? - locals_for_with.uploaditem : - typeof uploaditem !== 'undefined' ? uploaditem : undefined)); - return pug_html;} \ No newline at end of file