2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2024-12-23 10:38:55 +00:00

Merge branch 'master' of github.com:jiahaog/nativefier

This commit is contained in:
Jia Hao 2016-01-21 12:27:44 +08:00
commit 14a4846c1a
2 changed files with 4 additions and 4 deletions

View File

@ -23,7 +23,7 @@ $ npm install nativefier -g
## Usage
Creating an native desktop app for [medium.com](medium.com):
Creating a native desktop app for [medium.com](medium.com):
```bash
$ nativefier "http://medium.com"
@ -161,7 +161,7 @@ A template app with the appropriate event listeners and callbacks set up is incl
Tested mostly on OSX, but should work for windows and linux.
### Back Button
A back button is intentionally not provided because the tool is designed for single page apps. However, if desired, an executable can built for any url, and simply pressing the `backspace` key will take the user back to the previous page.
A back button is intentionally not provided because the tool is designed for single page apps. However, if desired, an executable can be built for any url, and simply pressing the `backspace` key will take the user back to the previous page.
## Issues

View File

@ -103,7 +103,7 @@ function getTitle(url, callback) {
}
const $ = cheerio.load(body);
const pageTitle = $("title").text();
const pageTitle = $("title").text().replace(/\//g, "");
callback(null, pageTitle);
});
}
@ -115,7 +115,7 @@ function normalizeUrl(testUrl) {
if (!parsed.protocol) {
normalized = 'http://' + normalized;
}
if (!validator.isURL(normalized, {require_protocol: true})) {
if (!validator.isURL(normalized, {require_protocol: true, require_tld: false})) {
throw `Your Url: "${normalized}" is invalid!`;
}
return normalized;