Skip to content

Commit 7783de2

Browse files
committed
Merge branch 'develop'
2 parents 97613bd + 7052cbb commit 7783de2

19 files changed

+1330
-411
lines changed

.eslintrc.json

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
{
2+
"parserOptions": {
3+
"ecmaVersion": 9,
4+
"sourceType": "module",
5+
"ecmaFeatures": {
6+
"jsx": true
7+
}
8+
},
9+
"env": {
10+
"browser": true,
11+
"es6": true,
12+
"webextensions": true,
13+
"commonjs": true
14+
},
15+
"rules": {
16+
"arrow-spacing": ["error", { "before": true, "after": true }],
17+
"block-spacing": ["error", "always"],
18+
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
19+
"comma-spacing": ["error", { "before": false, "after": true }],
20+
"comma-style": ["error", "first"],
21+
"eqeqeq": ["error", "always", { "null": "ignore" }],
22+
"func-call-spacing": ["error", "never"],
23+
"indent": ["error", 2, {
24+
"SwitchCase": 1,
25+
"VariableDeclarator": 1,
26+
"outerIIFEBody": 1,
27+
"MemberExpression": 1,
28+
"FunctionDeclaration": { "parameters": 1, "body": 1 },
29+
"FunctionExpression": { "parameters": 1, "body": 1 },
30+
"CallExpression": { "arguments": 1 },
31+
"ArrayExpression": 1,
32+
"ObjectExpression": 1,
33+
"ImportDeclaration": 1,
34+
"flatTernaryExpressions": false,
35+
"ignoreComments": false
36+
}],
37+
"key-spacing": ["error", { "beforeColon": false, "afterColon": true }],
38+
"keyword-spacing": ["error", { "before": true, "after": true }],
39+
"no-array-constructor": "error",
40+
"no-caller": "error",
41+
"no-class-assign": "error",
42+
"no-compare-neg-zero": "error",
43+
"no-cond-assign": "error",
44+
"no-const-assign": "error",
45+
"no-constant-condition": ["error", { "checkLoops": false }],
46+
"no-control-regex": "error",
47+
"no-debugger": "error",
48+
"no-dupe-args": "error",
49+
"no-dupe-class-members": "error",
50+
"no-dupe-keys": "error",
51+
"no-duplicate-case": "error",
52+
"no-empty-character-class": "error",
53+
"no-empty-pattern": "error",
54+
"no-eval": "error",
55+
"no-ex-assign": "error",
56+
"no-extend-native": "error",
57+
"no-extra-bind": "error",
58+
"no-extra-boolean-cast": "error",
59+
"no-extra-parens": ["error", "functions"],
60+
"no-fallthrough": "error",
61+
"no-floating-decimal": "error",
62+
"no-func-assign": "error",
63+
"no-global-assign": "error",
64+
"no-implied-eval": "error",
65+
"no-inner-declarations": ["error", "functions"],
66+
"no-invalid-regexp": "error",
67+
"no-irregular-whitespace": "error",
68+
"no-iterator": "error",
69+
"no-label-var": "error",
70+
"no-labels": ["error", { "allowLoop": false, "allowSwitch": false }],
71+
"no-lone-blocks": "error",
72+
"no-mixed-operators": ["error", {
73+
"groups": [
74+
["==", "!=", "===", "!==", ">", ">=", "<", "<="],
75+
["&&", "||"],
76+
["in", "instanceof"]
77+
],
78+
"allowSamePrecedence": true
79+
}],
80+
"no-mixed-spaces-and-tabs": "error",
81+
"no-multi-spaces": "error",
82+
"no-multi-str": "error",
83+
"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 0 }],
84+
"no-negated-in-lhs": "error",
85+
"no-new": "error",
86+
"no-new-func": "error",
87+
"no-new-object": "error",
88+
"no-new-require": "error",
89+
"no-new-symbol": "error",
90+
"no-new-wrappers": "error",
91+
"no-obj-calls": "error",
92+
"no-octal": "error",
93+
"no-octal-escape": "error",
94+
"no-path-concat": "error",
95+
"no-proto": "error",
96+
"no-redeclare": "error",
97+
"no-regex-spaces": "error",
98+
"no-return-assign": ["error", "except-parens"],
99+
"no-return-await": "error",
100+
"no-self-assign": "error",
101+
"no-self-compare": "error",
102+
"no-sequences": "error",
103+
"no-shadow-restricted-names": "error",
104+
"no-sparse-arrays": "error",
105+
"no-tabs": "error",
106+
"no-template-curly-in-string": "error",
107+
"no-this-before-super": "error",
108+
"no-throw-literal": "error",
109+
"no-trailing-spaces": "error",
110+
"no-undef": "error",
111+
"no-undef-init": "error",
112+
"no-unexpected-multiline": "error",
113+
"no-unmodified-loop-condition": "error",
114+
"no-unneeded-ternary": ["error", { "defaultAssignment": false }],
115+
"no-unreachable": "error",
116+
"no-unsafe-finally": "error",
117+
"no-unsafe-negation": "error",
118+
"no-unused-expressions": ["error", { "allowShortCircuit": true, "allowTernary": true, "allowTaggedTemplates": true }],
119+
"no-unused-vars": ["error", { "vars": "all", "args": "none", "ignoreRestSiblings": true }],
120+
"no-use-before-define": ["error", { "functions": false, "classes": false, "variables": false }],
121+
"no-useless-call": "error",
122+
"no-useless-computed-key": "error",
123+
"no-useless-constructor": "error",
124+
"no-useless-escape": "error",
125+
"no-useless-rename": "error",
126+
"no-useless-return": "error",
127+
"no-whitespace-before-property": "error",
128+
"no-with": "error",
129+
"object-property-newline": ["error", { "allowMultiplePropertiesPerLine": true }],
130+
"operator-linebreak": ["error", "after", { "overrides": { "?": "before", ":": "before" } }],
131+
"padded-blocks": ["error", { "blocks": "never", "switches": "never", "classes": "never" }],
132+
"prefer-promise-reject-errors": "error",
133+
"quotes": ["error", "single", { "avoidEscape": true, "allowTemplateLiterals": true }],
134+
"rest-spread-spacing": ["error", "never"],
135+
"semi": ["error", "never"],
136+
"semi-spacing": ["error", { "before": false, "after": true }],
137+
"space-before-blocks": ["error", "always"],
138+
"space-before-function-paren": ["error", "always"],
139+
"space-in-parens": ["error", "never"],
140+
"space-infix-ops": "error",
141+
"space-unary-ops": ["error", { "words": true, "nonwords": false }],
142+
"spaced-comment": ["error", "always", {
143+
"line": { "markers": ["*package", "!", "/", ",", "="] },
144+
"block": { "balanced": true, "markers": ["*package", "!", ",", ":", "::", "flow-include"], "exceptions": ["*"] }
145+
}],
146+
"symbol-description": "error",
147+
"template-curly-spacing": ["error", "never"],
148+
"template-tag-spacing": ["error", "never"],
149+
"unicode-bom": ["error", "never"],
150+
"use-isnan": "error",
151+
"valid-typeof": ["error", { "requireStringLiterals": true }],
152+
"wrap-iife": ["error", "any", { "functionPrototypeMethods": true }],
153+
"yield-star-spacing": ["error", "both"],
154+
"yoda": ["error", "never"]
155+
}
156+
}

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
.*.swp
1+
.*.sw*
2+
dist
3+
node_modules

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
## v2.0.0
2+
- NEW: Sync folder hierarchy
3+
- NEW: Allow custom folders to be chosen for syncing
4+
- NEW: Allow nesting synced folders
5+
- NEW: Remember last sync time per account
6+
- NEW: Overhauled user interface
7+
- NEW: Identify local duplicates and throw an error
8+
- FIX: Address performance problems
9+
- FIX: Allow deleting account when syncing
10+
- FIX: Ignore bookmarks with unsupported protocols
11+
- FIX: Sync more often (every 15min instead of 25min)
12+
- FIX: Call removeFromMappings on LOCALDELETE
13+
- FIX: Improve logging and error messages
14+
- FIX: Stop tracking bookmarks when they're moved outside the account scope
15+
116
## v1.3.4
217
- Fix normalizeURL: The relevant commit somehow didn't make it into the release builds
318

@@ -20,6 +35,7 @@
2035
- Fix nc url normalization
2136
- Trigger sync on local changes
2237
- Fix floccus fodler naming
38+
2339
## v1.2.0
2440
- Switched to the new nc-bookmarks v2 API
2541
- Increased sync interval, to reduce cpu load

README.md

Lines changed: 36 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,60 @@
1-
# ![](https://raw.githubusercontent.com/marcelklehr/floccus/master/icons/logo.png) Cirrus Floccus
2-
The goal of this project is to build a browser extension that syncs your browser data with [Nextcloud](http://nextcloud.com).
1+
# ![](https://raw.githubusercontent.com/marcelklehr/floccus/master/icons/logo.png) Floccus
2+
![](https://raw.githubusercontent.com/marcelklehr/floccus/master/img/screen_firefox_options.png)
33

4-
Historically this was once possible using [the mozilla sync owncloud app](https://github.com/owncloudarchive/mozilla_sync). However, Mozilla <del>did a Google</del> tried to improve Firefox Sync and dropped support for the old API. If you're into history, read [the owncloud issue on the topic](https://github.com/owncloudarchive/mozilla_sync/issues/33).
4+
> Sync your browser bookmarks with Nextcloud
55
6-
### Status
7-
- [x] Syncing bookmarks
8-
- [ ] Syncing History
6+
<a href="https://liberapay.com/marcelklehr/donate"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a>
97

10-
Currently you can setup multiple nextcloud accounts and floccus will create bookmarks folders whose contents will be synced with the nextcloud bookmarks account. It cannot handle folders, yet. (This is planned, though.) You can move the synced folders anywhere and rename them at will, however.
8+
The goal of this project is to build a browser extension that syncs your browser data with [Nextcloud](http://nextcloud.com).
119

12-
Tested to work in both Firefox and Chromium. Doesn't work in Firefox for Android [yet](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/bookmarks#Browser_compatibility). Requires nextcloud bookmarks app with at least version 0.10.
10+
Historically this was once possible using [the mozilla sync app](https://github.com/owncloudarchive/mozilla_sync). However, it's [not very easy anymore](https://github.com/owncloudarchive/mozilla_sync/issues/33) to run your own sync server and it still would only work with firefox.
1311

14-
## Installation
12+
**News:** Floccus v2.0 can now sync all your bookmarks with all of your ginormous folder hierarchy. :weight_lifting_woman:
13+
14+
## Install
15+
For this to work with your Nextcloud server, you need at least version v0.11 of the Bookmarks app installed. Once you've done that you can continue to install floccus in your browser as follows.
1516

1617
### Chrome
17-
Not in the web store yet.
18+
Not in the web store [yet](https://github.com/marcelklehr/floccus/issues/51).
1819

1920
You can still install it by [downloading the Chrome package from the latest release](https://github.com/marcelklehr/floccus/releases/) and dropping it into Chrome's extension page.
2021

22+
#### Updating from 1.x to v2.0
23+
It is recommended to remove all your accounts before updating floccus and reconnecting them again, in order to prevent unforeseen problems!
24+
2125
### Firefox
22-
You can [install it on AMO](https://addons.mozilla.org/en-US/firefox/addon/floccus/).
26+
You can [install it via AMO](https://addons.mozilla.org/en-US/firefox/addon/floccus/).
2327

24-
(Beware that AMO has to review all new releases, though, so you might need to wait a bit before you can install the latest release on firefox.)
28+
(Note that AMO has to review all new releases, though, so you might need to wait a bit before you can install the latest release on firefox.)
2529

26-
## Usage
27-
After installation the options pane will pop up allowing you to create accounts and edit their settings. You will be able to access this pane at all times by clicking the floccus icon in the browser toolbar.
30+
#### Updating from 1.x to v2.0
31+
It is recommended to remove all your accounts before updating floccus and reconnecting them again, in order to prevent unforeseen problems!
32+
33+
### Firefox for Android
34+
Floccus is not supported by Firefox for Android, [yet](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/bookmarks#Browser_compatibility).
2835

29-
For every account that you connect floccus to, it will create a new folder the first time it is synced. This folder will act like a Dropbox for your bookmarks: Put them in there to have them be synced with nextcloud. After connecting your accounts, these folders should be inside the "Other bookmarks" (or similar) folder in your browser, they should be titled "Nextcloud (user@your.nextcloud.tld)".
3036

31-
Floccus doesn't sync all of the bookmarks in your browser, partly because you should be able to have multiple accounts with different bookmarks to sync with and also because sadly floccus doesn't support folders, yet. You can rename and move this folder at will. Don't create any folders within, though, as that is not supported, yet.
37+
## Usage
38+
After installation the options pane will pop up allowing you to create accounts and edit their settings. You will be able to access this pane at all times by clicking the floccus icon in the browser tool bar.
39+
You can setup multiple nextcloud accounts and select a bookmark folder for each that should be synced with that account. Floccus will keep the bookmarks in sync with your nextcloud whenever you add or change them and will also sync periodically to pull the latest changes from the server.
40+
If you want to sync all bookmarks in your browser you need to select the topmost untitled folder in the folder picker.
41+
If something goes wrong during the sync process the floccus icon will sport a red exclamation mark. In the options pane you can then hover over the status text to get more information about the error.
3242

33-
## Prior art
34-
* [OwnCloud Bookmarks for chrome](https://chrome.google.com/webstore/detail/owncloud-bookmarks/eomolhpeokmbnincelpkagpapjpeeckc?hl=en-US), which basically acts as a proxy to the Owncloud Bookmarks app -- it doesn't integrate the bookmarks into the browser experience.
35-
* [OwnCloud 8 Bookmarks for chrome](https://chrome.google.com/webstore/detail/owncloud-8-bookmarks/efdanaldnkagmbmcngfpnjfgmgjhbjhm?hl=en-US), which basically does the same thing as the above: it has a few more features, but a less attractive UI
36-
* [A firefox addon](https://github.com/mjanser/firefox-addon-owncloud-bookmarks) similar to this one, developed using the old SDK
37-
* [Mark Lindhout's WebDAV-Bookmark-Sync](https://github.com/marklindhout/WebDAV-Bookmark-Sync) is quite promising as he doesn't depend on the feature-poor [owncloud Bookmarks app](https://github.com/owncloud/bookmarks), however he hasn't implemented syncing, yet
43+
### Limitations
44+
* Note that currently you cannot sync the same folder with multiple accounts in order to avoid data corruption. If you sync the root folder with one account and sync a sub folder with a different account, that sub-folder will not be synced with the account connected to the root folder anymore.
45+
* Floccus yields an error if you attempt to sync a folder with duplicate bookmarks (two or more bookmarks of the same URL). Remove one of the bookmarks for floccus to resume normal functionality.
3846

3947
## What's with the name?
4048
[Cirrus floccus](https://en.wikipedia.org/wiki/Cirrus_floccus) is a type of cloud, that <del>can sync your browser data</del> looks very nice.
4149

42-
## Support
43-
If you'd like to support the creating and maintainance of this software, consider donating.
50+
## Donate
51+
If you'd like to support the creation and maintenance of this software, consider donating.
4452

4553
<a href="https://liberapay.com/marcelklehr/donate"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a>
4654

47-
## Development
55+
## Contribute
56+
All contributions, code, feedback and strategic advice, are welcome. If you have a question you can contact me directly via email or simply [open an issue](https://github.com/marcelklehr/floccus/issues/new) on the repository. I'm also always happy for people helping me test new features -- see the issues for announcements of beta versions.
57+
4858
### Setting up a dev environment
4959
* Clone this repository.
5060
* Install node.js and npm
@@ -59,6 +69,5 @@ If you'd like to support the creating and maintainance of this software, conside
5969
Firefox expects a zip, for chrome do the following: https://developer.chrome.com/extensions/packaging (private key necessary!)
6070

6171
## License
62-
(c) 2016-2017 by Marcel Klehr
63-
MPL 2.0
64-
72+
(c) Marcel Klehr
73+
MPL-2.0 (see LICENSE.txt)

img/screen_firefox_account.png

66.2 KB
Loading
73.8 KB
Loading

img/screen_firefox_options.png

81.2 KB
Loading

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifest_version": 2,
33
"name": "Floccus (nextcloud Sync)",
44
"short_name": "Floccus",
5-
"version": "1.3.4",
5+
"version": "2.0.0",
66
"description": "Sync your browser with nextcloud (currently only bookmarks; more to come)",
77
"icons": {
88
"48": "icons/logo.png"

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "floccus",
3-
"version": "1.3.4",
3+
"version": "2.0.0",
44
"description": "The goal of this project is to build a browser extension that syncs your browser data with [OwnCloud](http://owncloud.org).",
55
"main": "index.js",
66
"scripts": {
@@ -31,6 +31,8 @@
3131
"dependencies": {
3232
"babel-polyfill": "^6.20.0",
3333
"dom-delegator": "^13.1.0",
34+
"humanize-duration": "^3.12.1",
35+
"parallel-array": "^1.1.0",
3436
"virtual-dom": "^2.1.1"
3537
}
3638
}

0 commit comments

Comments
 (0)