From f2d7195922bd72167f2a01ea10419296bc2e915a Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sat, 13 Jul 2024 14:29:19 +0200 Subject: chore(geschichte): Remove This is also irrelevant, as it is no longer used. --- geschichte/js/controllers/notes.js | 120 ------------------------------------- 1 file changed, 120 deletions(-) delete mode 100644 geschichte/js/controllers/notes.js (limited to 'geschichte/js/controllers/notes.js') diff --git a/geschichte/js/controllers/notes.js b/geschichte/js/controllers/notes.js deleted file mode 100644 index 7256425..0000000 --- a/geschichte/js/controllers/notes.js +++ /dev/null @@ -1,120 +0,0 @@ -/** - * Handles the showing of speaker notes - */ -export default class Notes { - - constructor( Reveal ) { - - this.Reveal = Reveal; - - } - - render() { - - this.element = document.createElement( 'div' ); - this.element.className = 'speaker-notes'; - this.element.setAttribute( 'data-prevent-swipe', '' ); - this.element.setAttribute( 'tabindex', '0' ); - this.Reveal.getRevealElement().appendChild( this.element ); - - } - - /** - * Called when the reveal.js config is updated. - */ - configure( config, oldConfig ) { - - if( config.showNotes ) { - this.element.setAttribute( 'data-layout', typeof config.showNotes === 'string' ? config.showNotes : 'inline' ); - } - - } - - /** - * Pick up notes from the current slide and display them - * to the viewer. - * - * @see {@link config.showNotes} - */ - update() { - - if( this.Reveal.getConfig().showNotes && this.element && this.Reveal.getCurrentSlide() && !this.Reveal.print.isPrintingPDF() ) { - - this.element.innerHTML = this.getSlideNotes() || 'No notes on this slide.'; - - } - - } - - /** - * Updates the visibility of the speaker notes sidebar that - * is used to share annotated slides. The notes sidebar is - * only visible if showNotes is true and there are notes on - * one or more slides in the deck. - */ - updateVisibility() { - - if( this.Reveal.getConfig().showNotes && this.hasNotes() && !this.Reveal.print.isPrintingPDF() ) { - this.Reveal.getRevealElement().classList.add( 'show-notes' ); - } - else { - this.Reveal.getRevealElement().classList.remove( 'show-notes' ); - } - - } - - /** - * Checks if there are speaker notes for ANY slide in the - * presentation. - */ - hasNotes() { - - return this.Reveal.getSlidesElement().querySelectorAll( '[data-notes], aside.notes' ).length > 0; - - } - - /** - * Checks if this presentation is running inside of the - * speaker notes window. - * - * @return {boolean} - */ - isSpeakerNotesWindow() { - - return !!window.location.search.match( /receiver/gi ); - - } - - /** - * Retrieves the speaker notes from a slide. Notes can be - * defined in two ways: - * 1. As a data-notes attribute on the slide
- * 2. With