// ==UserScript== // @author @leoncastro // @namespace https://github.com/leoncastro // @license MIT License; http://opensource.org/licenses/MIT // @name facebook-mod-helper // @version 0.04 // @description Facebook moderation helper // @icon http://icons.iconarchive.com/icons/paomedia/small-n-flat/64/social-facebook-icon.png // @require https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js // @include https://www.facebook.com/* // @include /^(https?:)?\/\/([^\.\/]+\.)?facebook\.com\/*.*/ // @compatible firefox+greasemonkey // @compatible chrome+tampermonkey // @grant none // @run-at document-end // @downloadURL none // ==/UserScript== // (function() { // @part-name @iconset // @part-webpage http://www.iconarchive.com/show/small-n-flat-icons-by-paomedia.1.html // @part-author https://github.com/paomedia // @part-license Public Domain; http://creativecommons.org/publicdomain/zero/1.0/ // @part-image http://icons.iconarchive.com/icons/paomedia/small-n-flat/64/social-facebook-icon.png // @part-image http://icons.iconarchive.com/icons/paomedia/small-n-flat/24/shield-icon.png // @part-image http://icons.iconarchive.com/icons/paomedia/small-n-flat/24/shield-error-icon.png // @part-image http://icons.iconarchive.com/icons/paomedia/small-n-flat/24/shield-warning-icon.png // @part-image http://icons.iconarchive.com/icons/paomedia/small-n-flat/24/sign-sync-icon.png // @part-image http://icons.iconarchive.com/icons/paomedia/small-n-flat/24/sign-down-icon.png // @part-image http://icons.iconarchive.com/icons/paomedia/small-n-flat/24/sign-up-icon.png // @part-image http://icons.iconarchive.com/icons/paomedia/small-n-flat/24/sign-right-icon.png // @part-image http://icons.iconarchive.com/icons/paomedia/small-n-flat/16/sign-error-icon.png // @part-image http://icons.iconarchive.com/icons/paomedia/small-n-flat/16/sign-warning-icon.png // @part-name @filesaver // @part-webpage https://github.com/eligrey/FileSaver.js // @part-author https://github.com/eligrey // @part-license MIT License; https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md // @part-file https://github.com/eligrey/FileSaver.js/blob/master/FileSaver.min.js // @part-content : /*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ var saveAs=saveAs||function(e){"use strict";if(typeof e==="undefined"||typeof navigator!=="undefined"&&/MSIE [1-9]\./.test(navigator.userAgent)){return}var t=e.document,n=function(){return e.URL||e.webkitURL||e},r=t.createElementNS("http://www.w3.org/1999/xhtml","a"),o="download"in r,i=function(e){var t=new MouseEvent("click");e.dispatchEvent(t)},a=/constructor/i.test(e.HTMLElement),f=/CriOS\/[\d]+/.test(navigator.userAgent),u=function(t){(e.setImmediate||e.setTimeout)(function(){throw t},0)},d="application/octet-stream",s=1e3*40,c=function(e){var t=function(){if(typeof e==="string"){n().revokeObjectURL(e)}else{e.remove()}};setTimeout(t,s)},l=function(e,t,n){t=[].concat(t);var r=t.length;while(r--){var o=e["on"+t[r]];if(typeof o==="function"){try{o.call(e,n||e)}catch(i){u(i)}}}},p=function(e){if(/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)){return new Blob([String.fromCharCode(65279),e],{type:e.type})}return e},v=function(t,u,s){if(!s){t=p(t)}var v=this,w=t.type,m=w===d,y,h=function(){l(v,"writestart progress write writeend".split(" "))},S=function(){if((f||m&&a)&&e.FileReader){var r=new FileReader;r.onloadend=function(){var t=f?r.result:r.result.replace(/^data:[^;]*;/,"data:attachment/file;");var n=e.open(t,"_blank");if(!n)e.location.href=t;t=undefined;v.readyState=v.DONE;h()};r.readAsDataURL(t);v.readyState=v.INIT;return}if(!y){y=n().createObjectURL(t)}if(m){e.location.href=y}else{var o=e.open(y,"_blank");if(!o){e.location.href=y}}v.readyState=v.DONE;h();c(y)};v.readyState=v.INIT;if(o){y=n().createObjectURL(t);setTimeout(function(){r.href=y;r.download=u;i(r);h();c(y);v.readyState=v.DONE});return}S()},w=v.prototype,m=function(e,t,n){return new v(e,t||e.name||"download",n)};if(typeof navigator!=="undefined"&&navigator.msSaveOrOpenBlob){return function(e,t,n){t=t||e.name||"download";if(!n){e=p(e)}return navigator.msSaveOrOpenBlob(e,t)}}w.abort=function(){};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return m}(typeof self!=="undefined"&&self||typeof window!=="undefined"&&window||this.content);if(typeof module!=="undefined"&&module.exports){module.exports.saveAs=saveAs}else if(typeof define!=="undefined"&&define!==null&&define.amd!==null){define([],function(){return saveAs})} // // @part-name @filereader // @part-website http://stackoverflow.com/questions/3582671/how-to-open-a-local-disk-file-with-javascript // @part-author http://github.com/moretti // @part-license CC-BY-SA; https://creativecommons.org/licenses/by-sa/3.0/legalcode // $('head').append(` `); mainAddMenu(); function mainAddMenu() { $('._cy6').eq(1).append(`