-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drag drop and loader #76
Conversation
This pull request introduces 1 alert when merging 5074a76 into 59594e7 - view on LGTM.com new alerts:
Comment posted by LGTM.com |
* Gracefully accepting constructive criticism | ||
* Focusing on what is best for the community | ||
* Showing empathy towards other community members | ||
- Using welcoming and inclusive language |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes even if required should be performed in separate PR. Let's keep the changes which are mainly for the issue.
@@ -1,8 +1,6 @@ | |||
CC0 1.0 Universal | |||
================== | |||
# CC0 1.0 Universal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly, this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just the "Markdown" extension on visual studio code.
README.md
Outdated
## Credits | ||
|
||
| Contributor | Name | | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer this to be present is a separate file like "contributors.md" which can be linked here.
To be added as a separate file.
This pull request introduces 1 alert when merging 58998a8 into 59594e7 - view on LGTM.com new alerts:
Comment posted by LGTM.com |
Thank you! |
* Drag&Drop + Loader * Edit Readme * Remove redundant code * Remove redundant code * Remove contributors section To be added as a separate file.
* Drag&Drop + Loader * Edit Readme * Remove redundant code * Remove redundant code * Remove contributors section To be added as a separate file.
* Drag&Drop + Loader * Edit Readme * Remove redundant code * Remove redundant code * Remove contributors section To be added as a separate file.
* Drag&Drop + Loader * Edit Readme * Remove redundant code * Remove redundant code * Remove contributors section To be added as a separate file.
* Drag&Drop + Loader * Edit Readme * Remove redundant code * Remove redundant code * Remove contributors section To be added as a separate file.
New Feature: #12 (PR #22)
Added a number of things:
Image editor demo:
Go back to H2 homepage:
Using the loader elsewhere:
Change 'YOUR_QUERY_SELECTOR' to the element that needs to exist before removing loading spinner. If element doesn't appear in 10 seconds, waitForLoader throws an error. You can create alternative spinners, just add the css and create your element with the ID 'loading'. Once the element exists, element with ID 'loading' is removed.
Example:
let loader = document.createElement("div");
loader.setAttribute("id", "loading");
loader.setAttribute("class", "loading");
loader.innerHTML = "Loading…";
document.body.appendChild(loader);
waitForLoader("YOUR_QUERY_SELECTOR")
.then(res => {
// Remove spinner once the element exists in DOM.
document.getElementById("loading").remove();
})
.catch(err => {
// 10 seconds has passed and element doesn't exists
});
Loader demo: