Skip to content
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

correct bug in devel and add the plugin list #5

Merged
merged 1 commit into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ You can use this library directly from jsdelivr CDN

# Using

It is possible to use _jsconfirm-buttons_ in a declarative way (i.e. including parameters in the html5 tags), or programmatically in a script.
It is possible to use _PowerButtons_ in a declarative way (i.e. including parameters in the html5 tags), or programmatically in a script.

## Using the library in a declarative way

Expand Down
2 changes: 1 addition & 1 deletion devel.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/default.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js"></script>
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/lipis/flag-icons@6.11.0/css/flag-icons.min.css"/>
<script src="js/init.js"></script>
<script src="js/utils.js"></script>
Expand Down Expand Up @@ -235,7 +236,6 @@ <h3>Dealing with defaults (internationalization example)</h3>
</div>
</body>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/dealfonso/showsource@1.2.1/dist/showsource.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js"></script>
<script>
Expand Down
6 changes: 5 additions & 1 deletion js/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ window.powerButtons = function(pluginName, els = [], options = {}) {
return els;
};

window.powerButtons.version = '2.0.0';
window.powerButtons.version = '2.0.1';
window.powerButtons.plugins = function() {
return Object.keys(PowerButtons.actionsRegistered);
}

// Now we add the plugin to jQuery, if it has been loaded
if (window.$ !== undefined) {
Expand All @@ -37,4 +40,5 @@ if (window.$ !== undefined) {
return this;
}
window.$.fn.powerButtons.version = window.powerButtons.version;
window.$.fn.powerButtons.plugins = window.powerButtons.plugins;
}