-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Drag&Drop + Loader * Edit Readme * Remove redundant code * Remove redundant code * Remove contributors section To be added as a separate file.
- Loading branch information
1 parent
98ad153
commit d2b5815
Showing
26 changed files
with
1,053 additions
and
428 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module.exports = { | ||
"extends": "standard" | ||
}; | ||
extends: "standard" | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,59 @@ | ||
# H2 | ||
Inspired by the Helium app, **H2** is a minimalist browser to watch embeded videos and more in picture-in-picture mode. | ||
|
||
Inspired by the Helium app, **H2** is a minimalist browser to watch embeded videos and more in picture-in-picture mode. | ||
|
||
# Features | ||
|
||
:tv: Works with any Youtube URL. | ||
|
||
:scroll: Works with PDFs links, Google Docs URLs. | ||
|
||
:computer: Works on all platforms, thanks to electron ❤️ | ||
|
||
:clock9:[WIP] After [#22](https://github.com/poush/H2/pull/22) a basic image editor, many other features coming soon. | ||
:art: Image editor supports contrast, brightness, hue, sepia and save as PNG. | ||
|
||
:clock9:[WIP] Many other features coming soon. | ||
|
||
# Example | ||
|
||
![demo](img/demo.gif) | ||
|
||
## Installation | ||
* [Windows](docs/windows.md) | ||
* [Mac](docs/mac.md) | ||
* [Linux](docs/linux.md) | ||
|
||
- [Windows](docs/windows.md) | ||
- [Mac](docs/mac.md) | ||
- [Linux](docs/linux.md) | ||
|
||
## Usage | ||
* Copy any youtube, PDF or google docs URL and press `Ctrl/Command + Shift + V` | ||
* [Keyboards Shortcuts](docs/shortcuts.md) | ||
|
||
- Copy any youtube, PDF or google docs URL and press `Ctrl/Command + Shift + V` | ||
- [Keyboards Shortcuts](docs/shortcuts.md) | ||
|
||
## Contributing | ||
|
||
```bash | ||
# Clone this repository | ||
|
||
git clone https://github.com/poush/h2 | ||
|
||
# Go into the repository | ||
|
||
cd h2 | ||
|
||
# Install dependencies | ||
|
||
npm install | ||
|
||
# Run the app | ||
|
||
npm start | ||
``` | ||
|
||
## Bug | ||
|
||
[Known Bugs](https://github.com/poush/H2/issues?q=is%3Aopen+is%3Aissue+label%3Abug) | ||
## Credits | ||
|
||
|
||
## License | ||
|
||
[CC0-1.0](https://github.com/poush/H2/blob/master/LICENSE.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,46 @@ | ||
class baseMediaProvider { | ||
|
||
constructor() { | ||
this.version = '0.1' | ||
this.name = 'base' | ||
this.response = { | ||
eventName: 'default', | ||
type: 'link', | ||
content: '' | ||
} | ||
} | ||
|
||
set text(link) { | ||
this.extractContents(link) | ||
} | ||
|
||
get content() { | ||
if(this.response.content != '' || this.response.link != undefined){ | ||
// console.log(this.response) | ||
return this | ||
} | ||
|
||
throw "InvalidContentByContentExtraction" | ||
} | ||
|
||
matcher(link) { | ||
|
||
} | ||
|
||
//method | ||
extractContents(link) { | ||
if (link != undefined || link != '') { | ||
this.response.content = link | ||
} | ||
|
||
return true | ||
} | ||
|
||
postWinLoad(win){ | ||
return true | ||
} | ||
|
||
preWinLoad(win) { | ||
//must return true | ||
return true | ||
} | ||
|
||
constructor() { | ||
this.version = "0.1"; | ||
this.name = "base"; | ||
this.response = { | ||
eventName: "default", | ||
type: "link", | ||
content: "" | ||
}; | ||
} | ||
|
||
set text(link) { | ||
this.extractContents(link); | ||
} | ||
|
||
get content() { | ||
if (this.response.content != "" || this.response.link != undefined) { | ||
// console.log(this.response) | ||
return this; | ||
} | ||
|
||
throw "InvalidContentByContentExtraction"; | ||
} | ||
|
||
matcher(link) {} | ||
|
||
//method | ||
extractContents(link) { | ||
if (link != undefined || link != "") { | ||
this.response.content = link; | ||
} | ||
|
||
return true; | ||
} | ||
|
||
postWinLoad(win) { | ||
return true; | ||
} | ||
|
||
preWinLoad(win) { | ||
//must return true | ||
return true; | ||
} | ||
} | ||
|
||
module.exports = baseMediaProvider | ||
module.exports = baseMediaProvider; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,32 @@ | ||
const baseMediaProvider = require('./baseMediaProvider') | ||
const baseMediaProvider = require("./baseMediaProvider"); | ||
|
||
class docsProvider extends baseMediaProvider { | ||
|
||
constructor(){ | ||
super() | ||
this.name = 'googleDocs' | ||
this.response.eventName = 'googleDocs' | ||
this.response.type = 'iframe' | ||
} | ||
|
||
matcher(link){ | ||
const regex = /https:\/\/docs.google.com\/document\/d\/[0-9A-Za-z]+/gm; | ||
var match = regex.exec(link) | ||
if(match) | ||
return match; | ||
|
||
return false; | ||
} | ||
|
||
extractContents(link) { | ||
if (link != undefined || link != '') { | ||
this.response.content = link | ||
} | ||
|
||
return true | ||
|
||
} | ||
|
||
postWinLoad(win){ | ||
return true | ||
} | ||
|
||
constructor() { | ||
super(); | ||
this.name = "googleDocs"; | ||
this.response.eventName = "googleDocs"; | ||
this.response.type = "iframe"; | ||
} | ||
|
||
matcher(link) { | ||
const regex = /https:\/\/docs.google.com\/document\/d\/[0-9A-Za-z]+/gm; | ||
var match = regex.exec(link); | ||
if (match) return match; | ||
|
||
return false; | ||
} | ||
|
||
extractContents(link) { | ||
if (link != undefined || link != "") { | ||
this.response.content = link; | ||
} | ||
|
||
return true; | ||
} | ||
|
||
postWinLoad(win) { | ||
return true; | ||
} | ||
} | ||
|
||
module.exports = docsProvider | ||
module.exports = docsProvider; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,31 @@ | ||
const baseMediaProvider = require('./baseMediaProvider') | ||
const baseMediaProvider = require("./baseMediaProvider"); | ||
|
||
class pdfProvider extends baseMediaProvider { | ||
|
||
constructor(){ | ||
super() | ||
this.name = 'pdf' | ||
this.response.type = 'link' | ||
} | ||
|
||
matcher(link){ | ||
const regex = /(https?:\/\/\S*?\.pdf)/gm; | ||
var match = regex.exec(link) | ||
if(match) | ||
return match; | ||
|
||
return false; | ||
} | ||
|
||
extractContents(link) { | ||
|
||
if (link != undefined || link != '') { | ||
this.response.content = link | ||
} | ||
|
||
return true | ||
|
||
} | ||
|
||
postWinLoad(win){ | ||
return true | ||
} | ||
|
||
constructor() { | ||
super(); | ||
this.name = "pdf"; | ||
this.response.type = "link"; | ||
} | ||
|
||
matcher(link) { | ||
const regex = /(https?:\/\/\S*?\.pdf)/gm; | ||
var match = regex.exec(link); | ||
if (match) return match; | ||
|
||
return false; | ||
} | ||
|
||
extractContents(link) { | ||
if (link != undefined || link != "") { | ||
this.response.content = link; | ||
} | ||
|
||
return true; | ||
} | ||
|
||
postWinLoad(win) { | ||
return true; | ||
} | ||
} | ||
|
||
module.exports = pdfProvider | ||
module.exports = pdfProvider; |
Oops, something went wrong.