Moved bookmarks to a subdirectory
This commit is contained in:
parent
ca1ed36e7b
commit
3923d6bfbf
10
README.md
10
README.md
@ -77,16 +77,6 @@ docker attach notify.moe
|
||||
* Make some changes and upload them to your fork.
|
||||
* Create a pull request on this repository (with the diffs of your fork).
|
||||
|
||||
### Bookmark
|
||||
|
||||
Create a bookmark in your browser and set this code as the URL:
|
||||
|
||||
```js
|
||||
javascript:(() => )();
|
||||
```
|
||||
|
||||
Clicking this bookmark will let you switch between `notify.moe` (live) and `beta.notify.moe` (development).
|
||||
|
||||
## Find us
|
||||
|
||||
* [Discord](https://discord.gg/0kimAmMCeXGXuzNF)
|
||||
|
@ -73,19 +73,6 @@ docker attach notify.moe
|
||||
* Make some changes and upload them to your fork.
|
||||
* Create a pull request on this repository (with the diffs of your fork).
|
||||
|
||||
### Bookmark
|
||||
|
||||
Create a bookmark in your browser and set this code as the URL:
|
||||
|
||||
```js
|
||||
javascript:(() => {
|
||||
location = location.href.indexOf('://beta.') === -1 ?
|
||||
location.href.replace('://', '://beta.') : location.href.replace('://beta.', '://');
|
||||
})();
|
||||
```
|
||||
|
||||
Clicking this bookmark will let you switch between `notify.moe` (live) and `beta.notify.moe` (development).
|
||||
|
||||
## Find us
|
||||
|
||||
* [Discord](https://discord.gg/0kimAmMCeXGXuzNF)
|
||||
|
14
docs/bookmarks.md
Normal file
14
docs/bookmarks.md
Normal file
@ -0,0 +1,14 @@
|
||||
# Bookmarks
|
||||
|
||||
## Live/Dev switcher
|
||||
|
||||
Create a bookmark in your browser and set this code as the URL:
|
||||
|
||||
```js
|
||||
javascript:(() => {
|
||||
location = location.href.indexOf('://beta.') === -1 ?
|
||||
location.href.replace('://', '://beta.') : location.href.replace('://beta.', '://');
|
||||
})();
|
||||
```
|
||||
|
||||
Clicking this bookmark will let you switch between `notify.moe` (live) and `beta.notify.moe` (development).
|
@ -1,28 +1,39 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"strings"
|
||||
"unicode"
|
||||
|
||||
"github.com/akyoto/color"
|
||||
"github.com/animenotifier/arn"
|
||||
)
|
||||
|
||||
var flaggedWords = regexp.MustCompile("fuck|fucking|freaking|shit|bad|terrible|awful|wtf")
|
||||
|
||||
func main() {
|
||||
color.Yellow("Showing user intros")
|
||||
|
||||
defer color.Green("Finished.")
|
||||
defer arn.Node.Close()
|
||||
|
||||
data, _ := ioutil.ReadFile("bad-words-list.txt")
|
||||
fullText := string(data)
|
||||
badWords := strings.Split(fullText, ",")
|
||||
|
||||
for user := range arn.StreamUsers() {
|
||||
if user.Introduction == "" {
|
||||
continue
|
||||
}
|
||||
|
||||
if flaggedWords.MatchString(user.Introduction) {
|
||||
color.Cyan(user.Nick)
|
||||
color.Red(user.Introduction)
|
||||
for _, badWord := range badWords {
|
||||
pos := strings.Index(user.Introduction, badWord)
|
||||
|
||||
if pos != -1 && (pos == 0 || !unicode.IsLetter(rune(user.Introduction[pos-1]))) && (pos+len(badWord) == len(user.Introduction) || !unicode.IsLetter(rune(user.Introduction[pos+len(badWord)]))) {
|
||||
color.Cyan(user.Nick)
|
||||
color.Red(badWord)
|
||||
fmt.Println(user.Introduction)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user