Skip to content
This repository has been archived by the owner on Jun 15, 2019. It is now read-only.

Commit

Permalink
Fixed #64
Browse files Browse the repository at this point in the history
  • Loading branch information
creesch committed Jul 27, 2013
1 parent 4a415b0 commit b3ac620
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 45 deletions.
80 changes: 39 additions & 41 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// @include http://reddit.com/*
// @include http://*.reddit.com/*
// @downloadURL http://userscripts.org/scripts/source/170952.user.js
// @version 1.2
// @version 1.3
// ==/UserScript==

function tbconf() {
Expand Down Expand Up @@ -74,33 +74,34 @@ function tbconf() {
<div class="tb-page-overlay tb-settings" comment="the white fade out over the page, we can do without, personally like it">\
<div class="tb-window-wrapper" comment="the window itself">\
<div class="tb-window-header" comment="This will contain the name of the window"> Toolbox Configuration <span class="tb-window-header-options"><a class="tb-help" href="javascript:;">?</a> - <a class="tb-close" href="javascript:;">X</a></span></div>\
<div class="tb-form">\
<div class="tb-window-tabs">\
<a target="_blank" href="http://www.reddit.com/r/'+ subreddit +'/wiki/pages" >wiki page listing</a>\
<a href="javascript:;" class="edit-wiki-page" page="toolbox">edit toolbox config</a>\
<a href="javascript:;" class="edit-wiki-page" page="usernotes">edit user notes</a>\
<a href="javascript:;" class="edit-wiki-page" page="automoderator">edit automoderator config</a>\
<span class="tb-window-spacer">&nbsp;</span>\
<a class="reason-settings" href="javascript:;">removal reason settings</a><a class="edit-reasons" href="javascript:;">edit removal reasons</a>\
<a class="edit-domains" href="javascript:;">domain tags</a>\
<!--<a class="tb-local-settings" href="javascript:;">toolbox settings</a><br>-->\
</div>\
<div class="tb-window-content" comment="This will contain all other elements, this is basically a wrapper to give is more flexibility in the future">\
\
\
<div class="tb-form">\
<p>\
<a class="reason-settings" href="javascript:;">removal reason settings</a><br>\
<a class="edit-reasons" href="javascript:;">edit removal reasons</a><br>\
<a class="edit-domains" href="javascript:;">domain tags</a><br>\
<!--<a class="tb-local-settings" href="javascript:;">toolbox settings</a><br>-->\
<a href="http://www.reddit.com/r/'+ subreddit +'/wiki/pages" >wiki page listing</a><br><br>\
<a href="javascript:;" class="edit-wiki-page" page="toolbox">edit toolbox config</a><br>\
<a href="javascript:;" class="edit-wiki-page" page="usernotes">edit user notes</a><br>\
<a href="javascript:;" class="edit-wiki-page" page="automoderator">edit automoderator config</a><br>\
<div class="wiki-edit-area" style="display: none;">\
<textarea class="edit-wikidata" rows="20" cols="20"></textarea><br>\
<input class="save-wiki-data" type="button" value="Save Page to Wiki"></input>&nbsp;&nbsp;\
<input class="cancel-wiki-data" type="button" value="Cancel"></input></div>\
</p>\
</div>\
<div class="reasons-notice" style="display:none;">\
<br><br><p>Removal reasons were found in your CSS but have not been saved to the wiki configuration page.<br />\
You will need to save them to the wiki before you can edit them. &nbsp;Would you like to do so now?<br />\
<a class="update-reasons" href="javascript:;">Save removal reasons to wiki</a> (note: this requires that you have wiki editing permisissions)</p>\
</div></div>\
</div>\
\
\
</div>\
<div class="tb-window-footer" comment="for the looks">&nbsp;</div>\
<div class="tb-window-footer" ><div class="wiki-edit-area" style="display: none;"><input class="save-wiki-data" type="button" value="Save Page to Wiki"></input>&nbsp;&nbsp;\
<input class="cancel-wiki-data" type="button" value="Cancel"></input></div></div>\
</div>\
<div class="tb-help-content">Choose what you want to edit.</div>\
</div>\
</div>\
Expand All @@ -118,19 +119,18 @@ You will need to save them to the wiki before you can edit them. &nbsp;Would you

var html = $('\
<div class="tb-page-overlay edit-domains-form " comment="the white fade out over the page, we can do without, personally like it">\
<div class="tb-window-wrapper" comment="the window itself">\
<div class="tb-window-header" comment="This will contain the name of the window"> Edit domains <span class="tb-window-header-options"><a class="tb-help" href="javascript:;">?</a></span></div>\
<div class="tb-window-wrapper-two" comment="the window itself">\
<div class="tb-window-header" comment="This will contain the name of the window"> Edit domains <span class="tb-window-header-options"><a class="tb-help" href="javascript:;">?</a> - <a class="cancel" href="javascript:;">X</a></span></div>\
<div class="tb-window-content" comment="This will contain all other elements, this is basically a wrapper to give is more flexibility in the future">\
\
\
<div class="tb-form">\
<p>import tags from /r/:&nbsp;<input class="importfrom" type="text"/></input> (note: you need to mod wiki in this sub and the import sub.)\
<p><input class="import" type="button" value="import" />&nbsp;&nbsp;&nbsp;<input class="cancel" type="button" value="cancel" /></p>\
<p>import tags from /r/:&nbsp;<input class="importfrom" type="text"/></input> (note: you need to mod wiki in this sub and the import sub.)</p>\
<table><tbody /></table></div>\
\
\
</div>\
<div class="tb-window-footer" comment="for the looks">&nbsp;</div>\
<div class="tb-window-footer"><input class="import" type="button" value="import" /></p>\</div>\
<div class="tb-help-content">Help for "edit domains"</div>\
</div>\
</div>\
Expand Down Expand Up @@ -163,20 +163,20 @@ You will need to save them to the wiki before you can edit them. &nbsp;Would you

var html = $('\
<div class="tb-page-overlay edit-reasons-form" comment="the white fade out over the page, we can do without, personally like it">\
<div class="tb-window-wrapper" comment="the window itself">\
<div class="tb-window-header" comment="This will contain the name of the window"> Edit reasons <span class="tb-window-header-options"><a class="tb-help" href="javascript:;">?</a></span></div>\
<div class="tb-window-wrapper-two" comment="the window itself">\
<div class="tb-window-header" comment="This will contain the name of the window"> Edit reasons <span class="tb-window-header-options"><a class="tb-help" href="javascript:;">?</a> - <a class="cancel" href="javascript:;">X</a></span></div>\
<div class="tb-window-content" comment="This will contain all other elements, this is basically a wrapper to give is more flexibility in the future">\
\
\
<div class="tb-form">\
<p><textarea class="edit-area" style="width: 800px; height: 150px;"></textarea></p>\
<span class="edit-save-area"><input class="save" type="button" value="new"/>&nbsp;&nbsp;&nbsp;<input class="cancel" type="button" value="cancel" />\
<span class="edit-save-area">\
&nbsp;&nbsp;(click on a reason below to edit it.)</span><br><br><br>\
<table ><tbody /></table></div>\
\
\
</div>\
<div class="tb-window-footer" comment="for the looks">&nbsp;</div>\
<div class="tb-window-footer" ><input class="save" type="button" value="new"/></div>\
<div class="tb-help-content">\
<h2>Input options:</h2>\
<p>\
Expand Down Expand Up @@ -263,8 +263,8 @@ You will need to save them to the wiki before you can edit them. &nbsp;Would you
$('body').delegate('.reason-settings', 'click', function() {
var html = '\
<div class="tb-page-overlay reason-setting-form " comment="the white fade out over the page, we can do without, personally like it">\
<div class="tb-window-wrapper" comment="the window itself">\
<div class="tb-window-header" comment="This will contain the name of the window"> Reason settings <span class="tb-window-header-options"><a class="tb-help" href="javascript:;">?</a></span></div>\
<div class="tb-window-wrapper-two" comment="the window itself">\
<div class="tb-window-header" comment="This will contain the name of the window"> Reason settings <span class="tb-window-header-options"><a class="tb-help" href="javascript:;">?</a> - <a class="cancel" href="javascript:;">X</a></span></div>\
<div class="tb-window-content" comment="This will contain all other elements, this is basically a wrapper to give is more flexibility in the future">\
\
\
Expand All @@ -285,39 +285,37 @@ You will need to save them to the wiki before you can edit them. &nbsp;Would you
<td>\
pmsubject:\
</td><td>\
<input class="pmsubject" style="width: 600px;" type="text" value="'+ (config.removalReasons.pmsubject ||'') +'"/>\
<input class="pmsubject" type="text" value="'+ (config.removalReasons.pmsubject ||'') +'"/>\
</td>\
</tr><tr>\
<td>\
logtitle:\
</td><td>\
<input class="logtitle" style="width: 600px;" type="text" value="'+ (config.removalReasons.logtitle || '') +'"/>\
<input class="logtitle" type="text" value="'+ (config.removalReasons.logtitle || '') +'"/>\
</td>\
</tr><tr>\
<td>\
bantitle:\
</td><td>\
<input class="bantitle" style="width: 600px;" type="text" value="'+ (config.removalReasons.bantitle || '') +'"/>\
<input class="bantitle" type="text" value="'+ (config.removalReasons.bantitle || '') +'"/>\
</td>\
</tr><tr>\
<td>\
logreason:\
</td><td>\
<input class="logreason" style="width: 600px;" type="text" value="'+ (config.removalReasons.logreason || '') +'"/>\
<input class="logreason" type="text" value="'+ (config.removalReasons.logreason || '') +'"/>\
</td>\
</tr><tr>\
<td>\
</table>\
</tr>\
</table>\
<span>Header:</span>\
<p><textarea class="edit-header" style="width: 600px; height: 100px;">'+ unescape(config.removalReasons.header || '') +'</textarea></p>\
<p><textarea class="edit-header" >'+ unescape(config.removalReasons.header || '') +'</textarea></p>\
<span>Footer:</span>\
<p><textarea class="edit-footer" style="width: 600px; height: 100px;">'+ unescape(config.removalReasons.footer || '') +'</textarea></p>\
<p><input class="save" type="button" value="save" />&nbsp;&nbsp;&nbsp;<input class="cancel" type="button" value="cancel" /></p>\
<p><textarea class="edit-footer" >'+ unescape(config.removalReasons.footer || '') +'</textarea></p>\
</div>\
\
\
</div>\
<div class="tb-window-footer" comment="for the looks">&nbsp;</div>\
<div class="tb-window-footer"><input class="save" type="button" value="save" /></div>\
<div class="tb-help-content">\
<p><strong>get reason from /r/:</strong> This will load the excisting reasons from an other subreddit. <span style="color:red">WARNING:</span> Will override all settings currently in place<p>\
<p><strong>logsub /r/:</strong>If this is filled in all removals will be logged to a subreddit specified in this field.<p>\
Expand Down Expand Up @@ -397,9 +395,9 @@ You will need to save them to the wiki before you can edit them. &nbsp;Would you

$('body').delegate('.edit-wiki-page', 'click', function(e) {
var page = $(e.target).attr('page'),
textArea = $('.edit-wikidata'),
saveButton = $('.save-wiki-data'),
editArea = $('.wiki-edit-area'),
textArea = $('body').find('.edit-wikidata'),
saveButton = $('body').find('.save-wiki-data'),
editArea = $('body').find('.wiki-edit-area'),
isAM = (page === 'automoderator');

// load the text area, but not the save button.
Expand Down
2 changes: 1 addition & 1 deletion domaintagger.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// @include http://reddit.com/r/*/about/modqueue*
// @include *://*.reddit.com/r/*
// @downloadURL http://userscripts.org/scripts/source/168936.user.js
// @version 2.5
// @version 2.6
// ==/UserScript==


Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

"name": "reddit Moderator Toolbox",
"description": "A set of tools to be used by moderators on reddit in order to make their jobs easier.",
"version": "0.31",
"version": "1.0",

"permissions": [
"https://*.reddit.com/",
Expand Down
2 changes: 1 addition & 1 deletion modtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// @include http://reddit.com/*
// @include http://*.reddit.com/*
// @downloadURL http://userscripts.org/scripts/source/165486.user.js
// @version 6.7
// @version 6.8
// @run-at document-start
// ==/UserScript==

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"description": "A set of tools to be used by moderators on reddit in order to make their jobs easier.",
"license": "GPL",
"author": "agentlame,creesch",
"version": "0.31",
"version": "1.0",
"fullName": "reddit Moderator Toolbox",
"id": "yes",
"name": "reddit_mod_tb",
Expand Down
37 changes: 37 additions & 0 deletions toolbox.css
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,18 @@
box-shadow: 0px 1px 3px 1px #D6D6D6;
}

.tb-window-wrapper-two {
position: relative;
top: 60px;
max-width: 1000px;
margin-right: auto !important;
margin-left: 50px !important;
padding: 0px !important;
background-color: #FFF;
border: solid 1px #808080;
box-shadow: 0px 1px 3px 1px #D6D6D6;
}

.tb-window-header {
right: 0px;
left: 0px;
Expand All @@ -164,6 +176,14 @@
padding: 10px !important;
}

.tb-window-spacer {
background-color: #8d9caa;
display: inline-block;
border-right: dotted 1px #A8B5C2;
height: 34px;
line-height: 34px;
}

.tb-window-tabs a:hover {
background-color: #9FBAD6;
}
Expand Down Expand Up @@ -240,6 +260,23 @@ width: 98%;
width: 25px;
}

.tb-form td {
padding: 2px;
}

.tb-form td:first-child {
width: 10%;
}

.tb-form td:last-child {
width: 90%;
}

.tb-form .edit-header, .tb-form .edit-footer {
width: 98%;
height: 100px;
}

div.sticky-queue {
position: fixed;
box-shadow: 0px 1px 3px 1px #D6D6D6;
Expand Down

0 comments on commit b3ac620

Please sign in to comment.