Skip to content
This repository has been archived by the owner on May 10, 2020. It is now read-only.

Commit

Permalink
Merge branch 'release/0.9.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianMaak committed Apr 11, 2018
2 parents 9225a28 + f877bbf commit 3f04909
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: node_js
node_js:
- "7"
- "8"
before_install: npm install
script: npm run test
35 changes: 5 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ it using settings.
* Advanced Comments
* Desktop Notifications
* Filter-Labels
* Integration of Rene8888s repost-check
* Integration of [Rene8888s repost-check](https://rep0st.rene8888.at)
* Automated text recognition
* Integration of [pr0p0ll.com](https://pr0p0ll.com)
* (ToDo) Slideshow mode
* (ToDo) Improved search

Expand All @@ -29,41 +30,15 @@ click on one of the following urls:
### Beta [![Build Status](https://travis-ci.org/FlorianMaak/p0weruser.svg?branch=develop)](https://travis-ci.org/FlorianMaak/p0weruser)
[https://github.com/FlorianMaak/p0weruser/raw/develop/dist/p0weruser.user.js](https://github.com/FlorianMaak/p0weruser/raw/develop/dist/p0weruser.user.js)

## Screenshots
![repost](https://user-images.githubusercontent.com/6325146/31791525-1e0a84b4-b519-11e7-90f8-c5306afcc485.jpg)
> Repost-Highlighting
![settings](https://user-images.githubusercontent.com/6325146/34748815-a9dab250-f59e-11e7-8384-84c5cbf862b9.png)
> Enable or diasble modules via settings
![widescreen](https://user-images.githubusercontent.com/6325146/31791527-1e3d0fa6-b519-11e7-9ded-b6d9720b5708.jpg)
> Use pr0gramm in a very productive widescreen-mode
![comments](https://user-images.githubusercontent.com/6325146/31791528-1e5496f8-b519-11e7-8210-5cd96c864761.jpg)
> Colorize comment-dimensions and quickly jump to parent comments
![notifications](https://user-images.githubusercontent.com/6325146/31791529-1e6bd46c-b519-11e7-8527-d620f50b07f2.jpg)
> Access your notifications directly from any page
![filterlabel](https://user-images.githubusercontent.com/6325146/34079132-8a060c7e-e327-11e7-8809-54e8ad811faa.jpg)
> See the images filter as a colored label
![rep0st](https://user-images.githubusercontent.com/6325146/34794921-926050aa-f650-11e7-9c8c-c1c728bc265b.png)
> Check if an image is a rep0st, by using the check on rep0st.rene8888.at
![ocr](https://user-images.githubusercontent.com/6325146/34748289-1fd1fae8-f59c-11e7-94ce-71369abf456c.png)
> Tired of retyping a text? Just use p0werusers optical character recognition (OCR) to simply copy the text!
## Missing Feature?
## Missing Feature or found a bug?
Just open an issue and describe your request as accurately as possible. If you like to do script it on your own, feel free to fork and open a Pull Request.

## Contribution
Feel free to fork this project. If you like to contribute, please use [git-flow](https://github.com/nvie/gitflow)
branch-style and follow the commits [conventions](https://github.com/FlorianMaak/p0weruser/wiki/Conventions). If your work is done, please submit a
pull request. All contributions will be released under [GPLv3 licence](https://github.com/FlorianMaak/p0weruser/blob/master/LICENSE).
pull request. All contributions **must** be released under [GPLv3 licence](https://github.com/FlorianMaak/p0weruser/blob/master/LICENSE).

## [Dev] Installation
After checkout run ```npm install``` and [npm](https://www.npmjs.com/) will install all needed dependencies and creates a new build in ```/dist```-Folder. After installation run
```npm run dev``` to start filewatchers, which are starting a new build after a
each filechange. Just create a new UserScript in Tapermonkey and add your local file (found in
```npm run dev``` to start filewatchers, which are starting a new build after each filechange. Just create a new UserScript in Tapermonkey and add your local file (found in
```dist``` folder) to test your script.
5 changes: 3 additions & 2 deletions dist/p0weruser.user.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"TaperMonkey",
"pr0gramm"
],
"version": "0.9.4",
"version": "0.9.5",
"license": "GPL-3.0",
"dependencies": {
"chart.js": "^2.7.2",
Expand Down
20 changes: 14 additions & 6 deletions src/module/Pr0p0ll.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Settings from '../Settings';
import SimpleBar from 'simplebar';
import moment from 'Moment';
import moment from 'moment';
import Pr0p0llDiagramm from '../lib/Pr0p0llDiagramm';

export default class Pr0p0ll {
Expand All @@ -10,6 +10,7 @@ export default class Pr0p0ll {
this.description = 'Erhalte Benachrichtigungen über neue Umfragen!';
this.showNotification = Settings.get('Pr0p0ll.settings.show_notification');
this.token = Settings.get('Pr0p0ll.settings.user_token');
this.showDiagramms = Settings.get('Pr0p0ll.settings.show_diagramms');
this.apiUrl = 'https://pr0p0ll.com/?p=viewjson&id=';

moment.locale('de');
Expand Down Expand Up @@ -47,6 +48,11 @@ export default class Pr0p0ll {
title: 'Desktopbenachrichtigung',
description: 'Zeige eine Desktopbenachrichtigung bei neuen Umfragen!',
},
{
id: 'show_diagramms',
title: 'Diagramme anzeigen',
description: 'Diagramme hinter pr0p0ll-links verlinken'
},
{
id: 'user_token',
title: '"Token für Notificator"',
Expand All @@ -58,17 +64,19 @@ export default class Pr0p0ll {


addListener() {
if (this.token) {
if (this.token !== true && this.token.length > 0) {
window.addEventListener('userSync', () => {
this.fetchCounter().then(res => {
this.updateCounter(res.openPolls);
});
});

window.addEventListener('commentsLoaded', e => {
let links = e.data.find('a[href*="pr0p0ll"][href*="id="]');
this.addLinks(links);
});
if (this.showDiagramms) {
window.addEventListener('commentsLoaded', e => {
let links = e.data.find('a[href*="pr0p0ll"][href*="id="]');
this.addLinks(links);
});
}
} else {
window.alert('Bitte öffne die Einstellungen um das Pr0p0ll-Modul zu konfigurieren.');
}
Expand Down
1 change: 1 addition & 0 deletions src/template/scriptHeader.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// @namespace https://github.com/FlorianMaak/p0weruser
// @author Florian Maak
// @description Erweitert pr0gramm.com um weitere Funktionen
// @license GPL-3.0; http://www.gnu.org/licenses/gpl-3.0.txt
// @include /^https?://pr0gramm.com/.*$/
// @include /^https://prep0st.rene8888.at.*$/
// @icon https://pr0gramm.com/media/pr0gramm-favicon.png
Expand Down
3 changes: 3 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ module.exports = {
filename: 'p0weruser.user.js',
path: path.resolve(__dirname, 'dist')
},
performance: {
hints: false
},
plugins: [
new WebpackAutoInject({
NAME: 'p0weruser',
Expand Down

0 comments on commit 3f04909

Please sign in to comment.