Skip to content

Commit

Permalink
style to css class
Browse files Browse the repository at this point in the history
  • Loading branch information
DonkeyPacific committed Jan 20, 2024
1 parent 2df9045 commit 7934acb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
11 changes: 5 additions & 6 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,11 @@ export default class CrossPlatformFullScreenPlugin extends Plugin {
const elements = document.querySelectorAll(cls);
if (cls && elements) {
elements.forEach((element, i) => {
if (element.style.display === 'none') {
element.style.display = this.elementsStatusMap.get(cls + i.toString());
this.elementsStatusMap.delete(cls + i.toString());
} else {
this.elementsStatusMap.set(cls + i.toString(), element.style.display);
element.style.display = 'none';
const cname = 'fullscreen-cross-platform-hidden';
if(element.classList.contains(cname)){
element.removeClass(cname);
} else{
element.addClass(cname);
}
});
}
Expand Down
3 changes: 3 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ available in the app when your plugin is enabled.
If your plugin does not need CSS, delete this file.
*/
.fullscreen-cross-platform-hidden{
display: none;
}

0 comments on commit 7934acb

Please sign in to comment.