| Age | Commit message (Collapse) | Author |
|
Pomf's old JavaScript is a frozen dependency hell with an old version of
Zepto. The amount of code included has reached the point of
unmaintainability, where nobody really understands very well how the
code works.
This code gets rid of all the previous client-side JavaScript and
replaces it with new, vanilla JavaScript. No dependencies required. This
new JavaScript should be quite a bit faster too.
Browser backwards compatibility has not been tested yet, however it is
expected that IE10 and later will work, improving our current backwards
compatibility.
Reviewed-by: Eliot Whalan <ewhal@pantsu.cat>
[wub@partyvan.eu: Added Git commit message and fixed Git branching.
Reverted /* outline-offset: -2px;*/ removal.]
Signed-off-by: Juuso Lapinlampi <wub@partyvan.eu>
|
|
Lint our spaghetti JavaScript code to be at least slightly more
readable. Configuration used is ESLint 1.7.x and airbnb/legacy.
It's been so long I cannot remember every change that was done, but long
story short: all the ESLint errors are now gone, at least at the date of
last commit.
moep contributed some ideas for patches: some were implemented, some
were discarded as the time and patience for merging this ran out. Thus,
there are still ESLint warnings about anonymous functions.
I don't feel like spending much more time on this. The future Pomf 2.1
development branch will replace the JavaScript code in its entirety,
courtesy of luminarys@.
Suggested-by: moep
Tested-by: Eliot Whalan <ewhal@pantsu.cat>
OK ewhal@, maybe a vague OK from luminarys@ a long time ago
|
|
When a local variable shares the same name with a variable in its scope,
it can cause confusion to the reader and make it impossible to access
the global variable.
Disallow shadowing. Fixes ESLint no-shadow errors using airbnb/legacy
config.
Suggested-by: marc <mharnos@gmail.com>
|
|
Quoting ESLint:
> Variables that are declared and not used anywhere in the code are most
> likely an error due to incomplete refactoring. Such variables take up
> space in the code and can lead to confusion by readers.
This commit removes them. Fixes ESLint no-unused-vars errors using
airbnb/legacy config.
Suggested-by: marc <mharnos@gmail.com>
|
|
ewhal@ didn't understand how changing the maximum file size works, so he
edited the JavaScript code directly to set the default to his desired
120MiB.
For all clones, this may not be viable and it's not a sane default in my
opinion. This doesn't change the fact that the maximum file size remains
to be what it's configured in the configuration (Gruntfile.js).
This bug was introduced in commit ec0154b, and potentially others.
Vague OK from ewhal@ many weeks ago.
|
|
JSHint is "deprecated" in favor of ESLint. Personally I have not used
JSHint ever since switching to ESLint.
Vague OK from ewhal@
|
|
Before this, JSCS would print an error about missing newline. This was
introduced in previous commit 24ce733.
|
|
Fixes ESLint vars-on-top errors using airbnb/legacy config.
|
|
Fixes ESLint id-length errors using airbnb/legacy config. Some arguments
were also unused, so this will also avoid introducing new no-unused-vars
lint errors.
|
|
This is something I would disagree with, because this commit in my
opinion reduces readability. I am not going to reinvent the wheel and
write for humans, because I enjoy being a slave to ESLint.
Any complaints about this commit should be directed at Airbnb to fix
their style guide. Alternatively, a documented standard style guide
should be created for pantsu.cat, extending the Airbnb config.
This fixes ESLint no-multi-spaces errors using airbnb/legacy config.
|
|
Prefix jQuery object variables with a $
|
|
Fixes ESLint no-undef warnings using Airbnb ES5 config.
|
|
This newline was accidentally introduced in commit a17c446.
Fixes ESLint warning padded-blocks using Airbnb ES5 config.
|
|
Fixes ESLint radix warning using Airbnb ES5 config.
|
|
While JSCS and ESLint do not detect this yet as of today, my eyes do.
The Airbnb style guide wants to do this.
This commit doesn't prefix cabinet.js, but the next commit will while
addressing another issue.
|
|
This is a surprising one. JSHint and JSCS do not seem to mind the
previous indentation, but ESLint throws an error when using the Airbnb
style guide. The style guide itself doesn't seem to mention anything
about this directly.
What ever it is, this one pleases all three linters.
Fixes ESLint indent warnings using Airbnb ES5 config.
|
|
Thanks to ASI (Automatic Semicolon Insertion) in JavaScript, not using
individual var declarations can actually cause subtle bugs.
Fixes JSCS disallowMultipleVarDecl warnings using Airbnb preset.
Reference:
http://benalman.com/news/2012/05/multiple-var-statements-javascript/
|
|
Fixes JSCS disallowTrailingWhitespace warnings using Airbnb preset.
|
|
Fixes JSCS requirePaddingNewLinesAfterBlocks warnings using Airbnb
preset.
|
|
Fixes ESLint warning no-redeclare.
|
|
Fixes ESLint no-unused-expressions warning.
|
|
Fixes ESLint no-cond-assign warning.
-- Sat, 26 Sep 2015 --
10:38:42 +bursey | while (node = node.parentNode) is invalid
10:38:54 +bursey | should be while (node == node.parentNode)
10:40:38 +bursey | weird actually
10:40:55 +bursey | Elements tend to be "true" in js
10:41:16 +bursey | but if the parentNode is undefined, then it's
| false
10:41:50 +bursey | thus it doesn't loop infinitely
10:43:00 +bursey | actually, use === instead of ==
|
|
Introduces client-side UPLOAD_ERR_MAX_SIZE and UPLOAD_ERR_FAILED
constants.
This reduces code duplication, which means less code smell.
|
|
There appears to be no such thing as a terrible scary bug that needs a
workaround in my Chromium 45.0.2454.85 browser to encode …. The
unobvious self-closing <div/> is also very questionable.
For what it's worth, … will encode correctly as long as you use
jQuery's .html() method – which it already did anyway.
OK ewhal@
|
|
OK ewhal@
|
|
This change may seem very subtle, but many screen readers will actually
behave differently.
Before this commit, a screenreader like JAWS may read "Grabbing URLs dot
dot dot". After this commit, JAWS may read "Grabbing URLs" and pauses
for a little longer.
Reference: http://www.deque.com/blog/dont-screen-readers-read-whats-scre
en-part-1-punctuation-typographic-symbols/
|
|
This compliments commit 7dca38c.
|
|
This cleans up a little bit of smelly code, which came from a copy-paste
job.
|
|
This is not how it appeared in the initial commit 1792788f5f, but
personally I like it and style guides allow me to adjust the whitespace
for these kind of variables.
Improves readability.
|
|
Improves readability by indenting these variables to same level.
Restores whitespace style like in initial commit 1792788f5f.
|
|
|
|
Fix bug introduced in 6c82d36307.
|
|
|
|
String concatenation is used because line terminating characters are not
allowed in the ECMAScript spec. Certain style guides such as Airbnb also
endorse using string concatenation.
|
|
Both Google and Node.js style guides prefer the use of ' over ". Much of
the rest of this code also uses singlequotes, so this brings the rest of
it to same level of consistency.
|
|
|
|
The npm style guide is bad. Don't use it! The lack of semicolons can
create very subtle bugs that are hard to debug.
This commit fixes about a hundred JSHint warnings.
|
|
|
|
This fixes another npm style guide idiom, which is "comma first".
|
|
|
|
Airbnb, Google, npm, Node.js and Idiomatic style guides suggest to use
two spaces for indentation. It seems to be the widely agreed consensus.
|
|
|
|
These commits are ShareX issues, not Pomf issues. Allowing these
commits to be in the source reduces maintainability.
This reverts commits bbcffe8d745937677352edf25e6a250ca8fd507b,
943e7e62a8ca814d47168bcebf2cc92dbce9a45a and partially
1411bce1dc13bf6fea66b5899ba29d50d5c53bb0.
|
|
|
|
|
|
|
|
|
|
- Minify HTML pages (using `grunt-contrib-htmlmin`)
- Fix minor display error (force encode of HTML entity)
|
|
|