Skip to content

Commit

Permalink
update for 3.2 and up
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Dec 19, 2023
1 parent 97c1b16 commit a65f8e2
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 53 deletions.
8 changes: 6 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ var defaultBanList = [
'smegma', 'spunk', 'tit', 'tosser', 'turd', 'twat', 'vagina', 'wank', 'whore',
];

const pluginName = 'Censor Curse Words';

var Beep = {
banned_words_raw: '',
banned_words: null,
Expand Down Expand Up @@ -67,7 +69,9 @@ var Beep = {
var middleware = params.middleware;

function render(req, res, next) {
res.render('admin/plugins/beep', {});
res.render('admin/plugins/beep', {
title: pluginName,
});
}
router.get('/admin/plugins/beep', middleware.admin.buildHeader, render);
router.get('/api/admin/plugins/beep', render);
Expand Down Expand Up @@ -181,7 +185,7 @@ var Beep = {
custom_header.plugins.push({
route: '/plugins/beep',
icon: 'fa-microphone-slash',
name: 'Censor Curse Words',
name: pluginName,
});
callback(null, custom_header);
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
"_id": "[email protected]",
"_from": "[email protected]",
"nbbpm": {
"compatibility": "^1.0.0 || ^1.1.0 || ^1.13.0 || ^1.16.1 || ^2.0.0"
"compatibility": "^3.2.0"
}
}
86 changes: 36 additions & 50 deletions public/templates/admin/plugins/beep.tpl
Original file line number Diff line number Diff line change
@@ -1,60 +1,46 @@
<div class="beep" class="row">
<div class="col-xs-12">
<form role="form" class="beep-settings">
<div class="row">
<div class="col-sm-2 col-xs-12 settings-header">Illegal Words</div>
<div class="col-sm-10 col-xs-12">
<fieldset>
<div class="form-group">
<label for="illegal"><i>comma-separated</i> list of Illegal Words (post will not be allowed)</label>
<textarea class="form-control" id="illegal" name="illegal" placeholder="eg. anal, anus, arse, ass, ballsack"></textarea>
</div>
</fieldset>
</div>
</div>
<div class="row">
<div class="col-sm-2 col-xs-12 settings-header">Banned Words</div>
<div class="col-sm-10 col-xs-12">
<fieldset>
<div class="form-group">
<label for="id"><i>comma-separated</i> list of Banned Words (post will be censored with asterisks)</label>
<textarea class="form-control" id="id" name="id" placeholder="eg. anal, anus, arse, ass, ballsack">anal, anus, arse, ass, ballsack, balls, bastard, bitch, biatch, bloody, blowjob, blow job, bollock, bollok, boner, boob, bugger, bum, butt, buttplug, clitoris, cock, coon, crap, cunt, damn, dick, dildo, dyke, fag, feck, fellate, fellatio, felching, fuck, f u c k, fudgepacker, fudge packer, flange, homo, jerk, jizz, knobend, knob end, labia, muff, nigger, nigga, penis, piss, poop, prick, pube, pussy, queer, sex, shit, s hit, sh1t, slut, smegma, spunk, tit, tosser, turd, twat, vagina, wank, whore</textarea>
</div>
</fieldset>
<div class="acp-page-container">
<!-- IMPORT admin/partials/settings/header.tpl -->

<div class="row m-0">
<div id="spy-container" class="col-12 px-0 mb-4" tabindex="0">
<form role="form" class="beep-settings">
<div class="mb-3">
<h5 class="fw-bold tracking-tight settings-header">Illegal Words</h5>
<div>
<label class="form-label" for="illegal"><i>comma-separated</i> list of Illegal Words (post will not be allowed)</label>
<textarea class="form-control" id="illegal" name="illegal" placeholder="eg. anal, anus, arse, ass, ballsack" rows="6"></textarea>
</div>
</div>
</div>
<div class="mb-3">
<h5 class="fw-bold tracking-tight settings-header">Banned Words</h5>

<div class="row">
<div class="col-sm-2 col-xs-12 settings-header">Banned URLs</div>
<div class="col-sm-10 col-xs-12">
<fieldset>
<div>
<label class="form-label" for="id"><i>comma-separated</i> list of Banned Words (post will be censored with asterisks)</label>
<textarea class="form-control" id="id" name="id" placeholder="eg. anal, anus, arse, ass, ballsack" rows="6">anal, anus, arse, ass, ballsack, balls, bastard, bitch, biatch, bloody, blowjob, blow job, bollock, bollok, boner, boob, bugger, bum, butt, buttplug, clitoris, cock, coon, crap, cunt, damn, dick, dildo, dyke, fag, feck, fellate, fellatio, felching, fuck, f u c k, fudgepacker, fudge packer, flange, homo, jerk, jizz, knobend, knob end, labia, muff, nigger, nigga, penis, piss, poop, prick, pube, pussy, queer, sex, shit, s hit, sh1t, slut, smegma, spunk, tit, tosser, turd, twat, vagina, wank, whore</textarea>
</div>
</div>

<div class="form-group">
<label for="urls"><i>comma-separated</i> list of Banned URLs (link will be shown as [link removed])</label>
<textarea class="form-control" id="urls" name="urls" placeholder="eg. google.com, yahoo.com"></textarea>
</div>
<div class="mb-3">
<h5 class="fw-bold tracking-tight settings-header">Banned Urls</h5>

</fieldset>
</div>
</div>

<div class="row">
<div class="col-sm-2 col-xs-12 settings-header">Censorship Settings</div>
<div class="col-sm-10 col-xs-12">
<fieldset>
<div class="checkbox">
<label>
<input type="checkbox" name="censorWholeWord">
Censor the entire word (as opposed to replacing the middle with <code>*</code>s)
</label>
</div>
</fieldset>
<div class="form-group">
<label for="urls"><i>comma-separated</i> list of Banned URLs (link will be shown as [link removed])</label>
<textarea class="form-control" id="urls" name="urls" placeholder="eg. google.com, yahoo.com" rows="6"></textarea>
</div>
</div>
</div>

</form>
<div class="mb-3">
<h5 class="fw-bold tracking-tight settings-header">Censorship Settings</h5>

<div class="form-check form-switch">
<label class="form-check-label">Censor the entire word (as opposed to replacing the middle with <code>*</code>s)</label>
<input class="form-check-input" type="checkbox" name="censorWholeWord">
</div>
</div>
</form>
</div>
</div>
</div>

<!-- IMPORT admin/partials/save_button.tpl -->


0 comments on commit a65f8e2

Please sign in to comment.