Function bodies 593 total
fireSlideEnter function · javascript · L71-L75 (5 LOC)Bayes2025summerLT/Biclustering0819_files/libs/quarto-html/quarto.js
function fireSlideEnter() {
const event = window.document.createEvent("Event");
event.initEvent("slideenter", true, true);
window.document.dispatchEvent(event);
}distpatchShinyEvents function · javascript · L84-L93 (10 LOC)Bayes2025summerLT/Biclustering0819_files/libs/quarto-html/quarto.js
function distpatchShinyEvents(previous, current) {
if (window.jQuery) {
if (previous) {
window.jQuery(previous).trigger("hidden");
}
if (current) {
window.jQuery(current).trigger("shown");
}
}
}hasTitleCategories function · javascript · L219-L221 (3 LOC)Bayes2025summerLT/Biclustering0819_files/libs/quarto-html/quarto.js
function hasTitleCategories() {
return window.document.querySelector(categorySelector) !== null;
}offsetRelativeUrl function · javascript · L223-L226 (4 LOC)Bayes2025summerLT/Biclustering0819_files/libs/quarto-html/quarto.js
function offsetRelativeUrl(url) {
const offset = getMeta("quarto:offset");
return offset ? offset + url : url;
}offsetAbsoluteUrl function · javascript · L228-L238 (11 LOC)Bayes2025summerLT/Biclustering0819_files/libs/quarto-html/quarto.js
function offsetAbsoluteUrl(url) {
const offset = getMeta("quarto:offset");
const baseUrl = new URL(offset, window.location);
const projRelativeUrl = url.replace(baseUrl, "");
if (projRelativeUrl.startsWith("/")) {
return projRelativeUrl;
} else {
return "/" + projRelativeUrl;
}
}getMeta function · javascript · L241-L249 (9 LOC)Bayes2025summerLT/Biclustering0819_files/libs/quarto-html/quarto.js
function getMeta(metaName) {
const metas = window.document.getElementsByTagName("meta");
for (let i = 0; i < metas.length; i++) {
if (metas[i].getAttribute("name") === metaName) {
return metas[i].getAttribute("content");
}
}
return "";
}findAndActivateCategories function · javascript · L251-L308 (58 LOC)Bayes2025summerLT/Biclustering0819_files/libs/quarto-html/quarto.js
async function findAndActivateCategories() {
// Categories search with listing only use path without query
const currentPagePath = offsetAbsoluteUrl(
window.location.origin + window.location.pathname
);
const response = await fetch(offsetRelativeUrl("listings.json"));
if (response.status == 200) {
return response.json().then(function (listingPaths) {
const listingHrefs = [];
for (const listingPath of listingPaths) {
const pathWithoutLeadingSlash = listingPath.listing.substring(1);
for (const item of listingPath.items) {
const encodedItem = encodeURI(item);
if (
encodedItem === currentPagePath ||
encodedItem === currentPagePath + "index.html"
) {
// Resolve this path against the offset to be sure
// we already are using the correct path to the listing
// (this adjusts the listing urls to be rooted against
Repobility (the analyzer behind this table) · https://repobility.com
toRegions function · javascript · L620-L632 (13 LOC)Bayes2025summerLT/Biclustering0819_files/libs/quarto-html/quarto.js
function toRegions(els) {
return els.map((el) => {
const boundRect = el.getBoundingClientRect();
const top =
boundRect.top +
document.documentElement.scrollTop -
kOverlapPaddingSize;
return {
top,
bottom: top + el.scrollHeight + 2 * kOverlapPaddingSize,
};
});
}throttle function · javascript · L830-L841 (12 LOC)Bayes2025summerLT/Biclustering0819_files/libs/quarto-html/quarto.js
function throttle(func, wait) {
let waiting = false;
return function () {
if (!waiting) {
func.apply(this, arguments);
waiting = true;
setTimeout(function () {
waiting = false;
}, wait);
}
};
}nexttick function · javascript · L843-L845 (3 LOC)Bayes2025summerLT/Biclustering0819_files/libs/quarto-html/quarto.js
function nexttick(func) {
return setTimeout(func, 0);
}init function · javascript · L3-L95 (93 LOC)Bayes2025summerLT/Biclustering0819_files/libs/quarto-html/tabsets/tabsets.js
export function init() {
window.addEventListener("pageshow", (_event) => {
function getTabSettings() {
const data = localStorage.getItem("quarto-persistent-tabsets-data");
if (!data) {
localStorage.setItem("quarto-persistent-tabsets-data", "{}");
return {};
}
if (data) {
return JSON.parse(data);
}
}
function setTabSettings(data) {
localStorage.setItem(
"quarto-persistent-tabsets-data",
JSON.stringify(data)
);
}
function setTabState(groupName, groupValue) {
const data = getTabSettings();
data[groupName] = groupValue;
setTabSettings(data);
}
function toggleTab(tab, active) {
const tabPanelId = tab.getAttribute("aria-controls");
const tabPanel = document.getElementById(tabPanelId);
if (active) {
tab.classList.add("active");
tabPanel.classList.add("active");
} else {
tab.classList.remove("active");
tabPagetTabSettings function · javascript · L5-L14 (10 LOC)Bayes2025summerLT/Biclustering0819_files/libs/quarto-html/tabsets/tabsets.js
function getTabSettings() {
const data = localStorage.getItem("quarto-persistent-tabsets-data");
if (!data) {
localStorage.setItem("quarto-persistent-tabsets-data", "{}");
return {};
}
if (data) {
return JSON.parse(data);
}
}setTabSettings function · javascript · L16-L21 (6 LOC)Bayes2025summerLT/Biclustering0819_files/libs/quarto-html/tabsets/tabsets.js
function setTabSettings(data) {
localStorage.setItem(
"quarto-persistent-tabsets-data",
JSON.stringify(data)
);
}setTabState function · javascript · L23-L27 (5 LOC)Bayes2025summerLT/Biclustering0819_files/libs/quarto-html/tabsets/tabsets.js
function setTabState(groupName, groupValue) {
const data = getTabSettings();
data[groupName] = groupValue;
setTabSettings(data);
}toggleTab function · javascript · L29-L39 (11 LOC)Bayes2025summerLT/Biclustering0819_files/libs/quarto-html/tabsets/tabsets.js
function toggleTab(tab, active) {
const tabPanelId = tab.getAttribute("aria-controls");
const tabPanel = document.getElementById(tabPanelId);
if (active) {
tab.classList.add("active");
tabPanel.classList.add("active");
} else {
tab.classList.remove("active");
tabPanel.classList.remove("active");
}
}Open data scored by Repobility · https://repobility.com
toggleAll function · javascript · L41-L48 (8 LOC)Bayes2025summerLT/Biclustering0819_files/libs/quarto-html/tabsets/tabsets.js
function toggleAll(selectedGroup, selectorsToSync) {
for (const [thisGroup, tabs] of Object.entries(selectorsToSync)) {
const active = selectedGroup === thisGroup;
for (const tab of tabs) {
toggleTab(tab, active);
}
}
}findSelectorsToSyncByLanguage function · javascript · L50-L69 (20 LOC)Bayes2025summerLT/Biclustering0819_files/libs/quarto-html/tabsets/tabsets.js
function findSelectorsToSyncByLanguage() {
const result = {};
const tabs = Array.from(
document.querySelectorAll(`div[data-group] a[id^='tabset-']`)
);
for (const item of tabs) {
const div = item.parentElement.parentElement.parentElement;
const group = div.getAttribute("data-group");
if (!result[group]) {
result[group] = {};
}
const selectorsToSync = result[group];
const value = item.innerHTML;
if (!selectorsToSync[value]) {
selectorsToSync[value] = [];
}
selectorsToSync[value].push(item);
}
return result;
}setupSelectorSync function · javascript · L71-L84 (14 LOC)Bayes2025summerLT/Biclustering0819_files/libs/quarto-html/tabsets/tabsets.js
function setupSelectorSync() {
const selectorsToSync = findSelectorsToSyncByLanguage();
Object.entries(selectorsToSync).forEach(([group, tabSetsByValue]) => {
Object.entries(tabSetsByValue).forEach(([value, items]) => {
items.forEach((item) => {
item.addEventListener("click", (_event) => {
setTabState(group, value);
toggleAll(value, selectorsToSync[group]);
});
});
});
});
return selectorsToSync;
}betterTrim function · javascript · L394-L437 (44 LOC)Bayes2025summerLT/Biclustering0819_files/libs/revealjs/plugin/highlight/plugin.js
function betterTrim(snippetEl) {
// Helper functions
function trimLeft(val) {
// Adapted from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill
return val.replace(/^[\s\uFEFF\xA0]+/g, '');
}
function trimLineBreaks(input) {
var lines = input.split('\n');
// Trim line-breaks from the beginning
for (var i = 0; i < lines.length; i++) {
if (lines[i].trim() === '') {
lines.splice(i--, 1);
} else break;
}
// Trim line-breaks from the end
for (var i = lines.length-1; i >= 0; i--) {
if (lines[i].trim() === '') {
lines.splice(i, 1);
} else break;
}
return lines.join('\n');
}
// Main function for betterTrim()
return (function(snippetEl) {
var content = trimLineBreaks(snippetEl.innerHTML);
var lines = content.split('\n');
// Calculate the minimum amount to remove on each line start of the snippet (can be 0)
var pad = lines.reduce(function(acc, line) {
if (line.length > 0 && trimLeft(ltrimLeft function · javascript · L396-L399 (4 LOC)Bayes2025summerLT/Biclustering0819_files/libs/revealjs/plugin/highlight/plugin.js
function trimLeft(val) {
// Adapted from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill
return val.replace(/^[\s\uFEFF\xA0]+/g, '');
}trimLineBreaks function · javascript · L400-L418 (19 LOC)Bayes2025summerLT/Biclustering0819_files/libs/revealjs/plugin/highlight/plugin.js
function trimLineBreaks(input) {
var lines = input.split('\n');
// Trim line-breaks from the beginning
for (var i = 0; i < lines.length; i++) {
if (lines[i].trim() === '') {
lines.splice(i--, 1);
} else break;
}
// Trim line-breaks from the end
for (var i = lines.length-1; i >= 0; i--) {
if (lines[i].trim() === '') {
lines.splice(i, 1);
} else break;
}
return lines.join('\n');
}getMarkdownFromSlide function · javascript · L38-L61 (24 LOC)Bayes2025summerLT/Biclustering0819_files/libs/revealjs/plugin/markdown/plugin.js
function getMarkdownFromSlide( section ) {
// look for a <script> or <textarea data-template> wrapper
const template = section.querySelector( '[data-template]' ) || section.querySelector( 'script' );
// strip leading whitespace so it isn't evaluated as code
let text = ( template || section ).textContent;
// restore script end tags
text = text.replace( new RegExp( SCRIPT_END_PLACEHOLDER, 'g' ), '</script>' );
const leadingWs = text.match( /^\n?(\s*)/ )[1].length,
leadingTabs = text.match( /^\n?(\t*)/ )[1].length;
if( leadingTabs > 0 ) {
text = text.replace( new RegExp('\\n?\\t{' + leadingTabs + '}(.*)','g'), function(m, p1) { return '\n' + p1 ; } );
}
else if( leadingWs > 1 ) {
text = text.replace( new RegExp('\\n? {' + leadingWs + '}(.*)', 'g'), function(m, p1) { return '\n' + p1 ; } );
}
return text;
}getForwardedAttributes function · javascript · L69-L91 (23 LOC)Bayes2025summerLT/Biclustering0819_files/libs/revealjs/plugin/markdown/plugin.js
function getForwardedAttributes( section ) {
const attributes = section.attributes;
const result = [];
for( let i = 0, len = attributes.length; i < len; i++ ) {
const name = attributes[i].name,
value = attributes[i].value;
// disregard attributes that are used for markdown loading/parsing
if( /data\-(markdown|separator|vertical|notes)/gi.test( name ) ) continue;
if( value ) {
result.push( name + '="' + value + '"' );
}
else {
result.push( name );
}
}
return result.join( ' ' );
}Citation: Repobility (2026). State of AI-Generated Code. https://repobility.com/research/
getSlidifyOptions function · javascript · L97-L108 (12 LOC)Bayes2025summerLT/Biclustering0819_files/libs/revealjs/plugin/markdown/plugin.js
function getSlidifyOptions( options ) {
const markdownConfig = deck?.getConfig?.().markdown;
options = options || {};
options.separator = options.separator || markdownConfig?.separator || DEFAULT_SLIDE_SEPARATOR;
options.verticalSeparator = options.verticalSeparator || markdownConfig?.verticalSeparator || DEFAULT_VERTICAL_SEPARATOR;
options.notesSeparator = options.notesSeparator || markdownConfig?.notesSeparator || DEFAULT_NOTES_SEPARATOR;
options.attributes = options.attributes || '';
return options;
}createMarkdownSlide function · javascript · L113-L129 (17 LOC)Bayes2025summerLT/Biclustering0819_files/libs/revealjs/plugin/markdown/plugin.js
function createMarkdownSlide( content, options ) {
options = getSlidifyOptions( options );
const notesMatch = content.split( new RegExp( options.notesSeparator, 'mgi' ) );
if( notesMatch.length === 2 ) {
content = notesMatch[0] + '<aside class="notes">' + marked(notesMatch[1].trim()) + '</aside>';
}
// prevent script end tags in the content from interfering
// with parsing
content = content.replace( /<\/script>/g, SCRIPT_END_PLACEHOLDER );
return '<script type="text/template">' + content + '</script>';
}slidify function · javascript · L135-L201 (67 LOC)Bayes2025summerLT/Biclustering0819_files/libs/revealjs/plugin/markdown/plugin.js
function slidify( markdown, options ) {
options = getSlidifyOptions( options );
const separatorRegex = new RegExp( options.separator + ( options.verticalSeparator ? '|' + options.verticalSeparator : '' ), 'mg' ),
horizontalSeparatorRegex = new RegExp( options.separator );
let matches,
lastIndex = 0,
isHorizontal,
wasHorizontal = true,
content,
sectionStack = [];
// iterate until all blocks between separators are stacked up
while( matches = separatorRegex.exec( markdown ) ) {
const notes = null;
// determine direction (horizontal by default)
isHorizontal = horizontalSeparatorRegex.test( matches[0] );
if( !isHorizontal && wasHorizontal ) {
// create vertical stack
sectionStack.push( [] );
}
// pluck slide content from markdown input
content = markdown.substring( lastIndex, matches.index );
if( isHorizontal && wasHorizontal ) {
// add to horizontal stack
sectionStack.push( content );
}
else {
// add to processSlides function · javascript · L208-L259 (52 LOC)Bayes2025summerLT/Biclustering0819_files/libs/revealjs/plugin/markdown/plugin.js
function processSlides( scope ) {
return new Promise( function( resolve ) {
const externalPromises = [];
[].slice.call( scope.querySelectorAll( 'section[data-markdown]:not([data-markdown-parsed])') ).forEach( function( section, i ) {
if( section.getAttribute( 'data-markdown' ).length ) {
externalPromises.push( loadExternalMarkdown( section ).then(
// Finished loading external file
function( xhr, url ) {
section.outerHTML = slidify( xhr.responseText, {
separator: section.getAttribute( 'data-separator' ),
verticalSeparator: section.getAttribute( 'data-separator-vertical' ),
notesSeparator: section.getAttribute( 'data-separator-notes' ),
attributes: getForwardedAttributes( section )
});
},
// Failed to load markdown
function( xhr, url ) {
section.outerHTML = '<section data-state="alert">' +
'ERROR: The attempt to fetch ' + url + ' failed with HTTP status ' + xhr.status + '.'loadExternalMarkdown function · javascript · L261-L303 (43 LOC)Bayes2025summerLT/Biclustering0819_files/libs/revealjs/plugin/markdown/plugin.js
function loadExternalMarkdown( section ) {
return new Promise( function( resolve, reject ) {
const xhr = new XMLHttpRequest(),
url = section.getAttribute( 'data-markdown' );
const datacharset = section.getAttribute( 'data-charset' );
// see https://developer.mozilla.org/en-US/docs/Web/API/element.getAttribute#Notes
if( datacharset !== null && datacharset !== '' ) {
xhr.overrideMimeType( 'text/html; charset=' + datacharset );
}
xhr.onreadystatechange = function( section, xhr ) {
if( xhr.readyState === 4 ) {
// file protocol yields status code 0 (useful for local debug, mobile applications etc.)
if ( ( xhr.status >= 200 && xhr.status < 300 ) || xhr.status === 0 ) {
resolve( xhr, url );
}
else {
reject( xhr, url );
}
}
}.bind( this, section, xhr );
xhr.open( 'GET', url, true );
try {
xhr.send();
}
catch ( e ) {
console.warn( 'Failed to get the Markdown file ' + url + '. Make sure thaddAttributeInElement function · javascript · L314-L336 (23 LOC)Bayes2025summerLT/Biclustering0819_files/libs/revealjs/plugin/markdown/plugin.js
function addAttributeInElement( node, elementTarget, separator ) {
const markdownClassesInElementsRegex = new RegExp( separator, 'mg' );
const markdownClassRegex = new RegExp( "([^\"= ]+?)=\"([^\"]+?)\"|(data-[^\"= ]+?)(?=[\" ])", 'mg' );
let nodeValue = node.nodeValue;
let matches,
matchesClass;
if( matches = markdownClassesInElementsRegex.exec( nodeValue ) ) {
const classes = matches[1];
nodeValue = nodeValue.substring( 0, matches.index ) + nodeValue.substring( markdownClassesInElementsRegex.lastIndex );
node.nodeValue = nodeValue;
while( matchesClass = markdownClassRegex.exec( classes ) ) {
if( matchesClass[2] ) {
elementTarget.setAttribute( matchesClass[1], matchesClass[2] );
} else {
elementTarget.setAttribute( matchesClass[3], "" );
}
}
return true;
}
return false;
}addAttributes function · javascript · L342-L375 (34 LOC)Bayes2025summerLT/Biclustering0819_files/libs/revealjs/plugin/markdown/plugin.js
function addAttributes( section, element, previousElement, separatorElementAttributes, separatorSectionAttributes ) {
if ( element !== null && element.childNodes !== undefined && element.childNodes.length > 0 ) {
let previousParentElement = element;
for( let i = 0; i < element.childNodes.length; i++ ) {
const childElement = element.childNodes[i];
if ( i > 0 ) {
let j = i - 1;
while ( j >= 0 ) {
const aPreviousChildElement = element.childNodes[j];
if ( typeof aPreviousChildElement.setAttribute === 'function' && aPreviousChildElement.tagName !== "BR" ) {
previousParentElement = aPreviousChildElement;
break;
}
j = j - 1;
}
}
let parentSection = section;
if( childElement.nodeName === "section" ) {
parentSection = childElement ;
previousParentElement = childElement ;
}
if ( typeof childElement.setAttribute === 'function' || childElement.nodeType === Node.COMMENT_NODE ) {
addAttributes(convertSlides function · javascript · L381-L410 (30 LOC)Bayes2025summerLT/Biclustering0819_files/libs/revealjs/plugin/markdown/plugin.js
function convertSlides() {
const sections = deck.getRevealElement().querySelectorAll( '[data-markdown]:not([data-markdown-parsed])');
[].slice.call( sections ).forEach( function( section ) {
section.setAttribute( 'data-markdown-parsed', true )
const notes = section.querySelector( 'aside.notes' );
const markdown = getMarkdownFromSlide( section );
section.innerHTML = marked( markdown );
addAttributes( section, section, null, section.getAttribute( 'data-element-attributes' ) ||
section.parentNode.getAttribute( 'data-element-attributes' ) ||
DEFAULT_ELEMENT_ATTRIBUTES_SEPARATOR,
section.getAttribute( 'data-attributes' ) ||
section.parentNode.getAttribute( 'data-attributes' ) ||
DEFAULT_SLIDE_ATTRIBUTES_SEPARATOR);
// If there were notes, we need to re-add them after
// having overwritten the section's HTML
if( notes ) {
section.appendChild( notes );
}
} );
return Promise.resolve();
}Same scanner, your repo: https://repobility.com — Repobility
escapeForHTML function · javascript · L412-L416 (5 LOC)Bayes2025summerLT/Biclustering0819_files/libs/revealjs/plugin/markdown/plugin.js
function escapeForHTML( input ) {
return input.replace( /([&<>'"])/g, char => HTML_ESCAPE_MAP[char] );
}loadScripts function · javascript · L44-L48 (5 LOC)Bayes2025summerLT/Biclustering0819_files/libs/revealjs/plugin/math/katex.js
async function loadScripts(urls) {
for(const url of urls) {
await loadScript(url);
}
}loadScript function · javascript · L21-L48 (28 LOC)Bayes2025summerLT/Biclustering0819_files/libs/revealjs/plugin/math/mathjax2.js
function loadScript( url, callback ) {
let head = document.querySelector( 'head' );
let script = document.createElement( 'script' );
script.type = 'text/javascript';
script.src = url;
// Wrapper for callback to make sure it only fires once
let finish = () => {
if( typeof callback === 'function' ) {
callback.call();
callback = null;
}
}
script.onload = finish;
// IE
script.onreadystatechange = () => {
if ( this.readyState === 'loaded' ) {
finish();
}
}
// Normal browsers
head.appendChild( script );
}loadScript function · javascript · L30-L48 (19 LOC)Bayes2025summerLT/Biclustering0819_files/libs/revealjs/plugin/math/mathjax3.js
function loadScript( url, callback ) {
let script = document.createElement( 'script' );
script.type = "text/javascript"
script.id = "MathJax-script"
script.src = url;
script.async = true
// Wrapper for callback to make sure it only fires once
script.onload = () => {
if (typeof callback === 'function') {
callback.call();
callback = null;
}
};
document.head.appendChild( script );
}openSpeakerWindow function · javascript · L25-L44 (20 LOC)Bayes2025summerLT/Biclustering0819_files/libs/revealjs/plugin/notes/plugin.js
function openSpeakerWindow() {
// If a window is already open, focus it
if( speakerWindow && !speakerWindow.closed ) {
speakerWindow.focus();
}
else {
speakerWindow = window.open( 'about:blank', 'reveal.js - Notes', 'width=1100,height=700' );
speakerWindow.marked = marked;
speakerWindow.document.write( speakerViewHTML );
if( !speakerWindow ) {
alert( 'Speaker view popup failed to open. Please make sure popups are allowed and reopen the speaker view.' );
return;
}
connect();
}
}reconnectSpeakerWindow function · javascript · L49-L60 (12 LOC)Bayes2025summerLT/Biclustering0819_files/libs/revealjs/plugin/notes/plugin.js
function reconnectSpeakerWindow( reconnectWindow ) {
if( speakerWindow && !speakerWindow.closed ) {
speakerWindow.focus();
}
else {
speakerWindow = reconnectWindow;
window.addEventListener( 'message', onPostMessage );
onConnected();
}
}connect function · javascript · L68-L87 (20 LOC)Bayes2025summerLT/Biclustering0819_files/libs/revealjs/plugin/notes/plugin.js
function connect() {
const presentationURL = deck.getConfig().url;
const url = typeof presentationURL === 'string' ? presentationURL :
window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search;
// Keep trying to connect until we get a 'connected' message back
connectInterval = setInterval( function() {
speakerWindow.postMessage( JSON.stringify( {
namespace: 'reveal-notes',
type: 'connect',
state: deck.getState(),
url
} ), '*' );
}, 500 );
window.addEventListener( 'message', onPostMessage );
}callRevealApi function · javascript · L93-L103 (11 LOC)Bayes2025summerLT/Biclustering0819_files/libs/revealjs/plugin/notes/plugin.js
function callRevealApi( methodName, methodArguments, callId ) {
let result = deck[methodName].apply( deck, methodArguments );
speakerWindow.postMessage( JSON.stringify( {
namespace: 'reveal-notes',
type: 'return',
result,
callId
} ), '*' );
}Repobility (the analyzer behind this table) · https://repobility.com
post function · javascript · L108-L160 (53 LOC)Bayes2025summerLT/Biclustering0819_files/libs/revealjs/plugin/notes/plugin.js
function post( event ) {
let slideElement = deck.getCurrentSlide(),
notesElements = slideElement.querySelectorAll( 'aside.notes' ),
fragmentElement = slideElement.querySelector( '.current-fragment' );
let messageData = {
namespace: 'reveal-notes',
type: 'state',
notes: '',
markdown: false,
whitespace: 'normal',
state: deck.getState()
};
// Look for notes defined in a slide attribute
if( slideElement.hasAttribute( 'data-notes' ) ) {
messageData.notes = slideElement.getAttribute( 'data-notes' );
messageData.whitespace = 'pre-wrap';
}
// Look for notes defined in a fragment
if( fragmentElement ) {
let fragmentNotes = fragmentElement.querySelector( 'aside.notes' );
if( fragmentNotes ) {
messageData.notes = fragmentNotes.innerHTML;
messageData.markdown = typeof fragmentNotes.getAttribute( 'data-markdown' ) === 'string';
// Ignore other slide notes
notesElements = null;
}
else if( fragmentElement.hasAttribute( 'disSameOriginEvent function · javascript · L166-L175 (10 LOC)Bayes2025summerLT/Biclustering0819_files/libs/revealjs/plugin/notes/plugin.js
function isSameOriginEvent( event ) {
try {
return window.location.origin === event.source.location.origin;
}
catch ( error ) {
return false;
}
}onPostMessage function · javascript · L177-L196 (20 LOC)Bayes2025summerLT/Biclustering0819_files/libs/revealjs/plugin/notes/plugin.js
function onPostMessage( event ) {
// Only allow same-origin messages
// (added 12/5/22 as a XSS safeguard)
if( isSameOriginEvent( event ) ) {
try {
let data = JSON.parse( event.data );
if( data && data.namespace === 'reveal-notes' && data.type === 'connected' ) {
clearInterval( connectInterval );
onConnected();
}
else if( data && data.namespace === 'reveal-notes' && data.type === 'call' ) {
callRevealApi( data.methodName, data.arguments, data.callId );
}
} catch (e) {}
}
}onConnected function · javascript · L202-L216 (15 LOC)Bayes2025summerLT/Biclustering0819_files/libs/revealjs/plugin/notes/plugin.js
function onConnected() {
// Monitor events that trigger a change in state
deck.on( 'slidechanged', post );
deck.on( 'fragmentshown', post );
deck.on( 'fragmenthidden', post );
deck.on( 'overviewhidden', post );
deck.on( 'overviewshown', post );
deck.on( 'paused', post );
deck.on( 'resumed', post );
// Post the initial state
post();
}getRevealJsPath function · javascript · L7-L17 (11 LOC)Bayes2025summerLT/Biclustering0819_files/libs/revealjs/plugin/pdf-export/pdfexport.js
function getRevealJsPath(){
var regex = /\b[^/]+\/reveal.css$/i;
var script = Array.from( document.querySelectorAll( 'link' ) ).find( function( e ){
return e.attributes.href && e.attributes.href.value.search( regex ) >= 0;
});
if( !script ){
console.error( 'reveal.css could not be found in included <link> elements. Did you rename this file?' );
return '';
}
return script.attributes.href.value.replace( regex, '' );
}setStylesheet3 function · javascript · L19-L32 (14 LOC)Bayes2025summerLT/Biclustering0819_files/libs/revealjs/plugin/pdf-export/pdfexport.js
function setStylesheet3( pdfExport ){
var link = document.querySelector( '#print' );
if( !link ){
link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.id = 'print';
document.querySelector( 'head' ).appendChild( link );
}
var style = 'paper';
if( pdfExport ){
style = 'pdf';
}
link.href = getRevealJsPath() + 'css/print/' + style + '.css';
}installAltKeyBindings4 function · javascript · L40-L53 (14 LOC)Bayes2025summerLT/Biclustering0819_files/libs/revealjs/plugin/pdf-export/pdfexport.js
function installAltKeyBindings4(){
if( isPrintingPDF() ){
var config = Reveal.getConfig();
var shortcut = config.pdfExportShortcut || 'E';
window.addEventListener( 'keydown', function( e ){
if( e.target.nodeName.toUpperCase() == 'BODY'
&& ( e.key.toUpperCase() == shortcut.toUpperCase() || e.keyCode == shortcut.toUpperCase().charCodeAt( 0 ) ) ){
e.preventDefault();
togglePdfExport();
return false;
}
}, true );
}
}isPrintingPDF function · javascript · L55-L57 (3 LOC)Bayes2025summerLT/Biclustering0819_files/libs/revealjs/plugin/pdf-export/pdfexport.js
function isPrintingPDF(){
return /print-pdf/gi.test(window.location.search) || /view=print/gi.test(window.location.search);
}Open data scored by Repobility · https://repobility.com
togglePdfExport function · javascript · L59-L73 (15 LOC)Bayes2025summerLT/Biclustering0819_files/libs/revealjs/plugin/pdf-export/pdfexport.js
function togglePdfExport(){
var url_doc = new URL( document.URL );
var query_doc = new URLSearchParams( url_doc.searchParams );
if( isPrintingPDF() ){
if (query_doc.has('print-pdf')) {
query_doc.delete('print-pdf');
} else if (query_doc.has('view')) {
query_doc.delete('view');
}
}else{
query_doc.set( 'view', 'print' );
}
url_doc.search = ( query_doc.toString() ? '?' + query_doc.toString() : '' );
window.location.href = url_doc.toString();
}installKeyBindings function · javascript · L75-L84 (10 LOC)Bayes2025summerLT/Biclustering0819_files/libs/revealjs/plugin/pdf-export/pdfexport.js
function installKeyBindings(){
var config = Reveal.getConfig();
var shortcut = config.pdfExportShortcut || 'E';
Reveal.addKeyBinding({
keyCode: shortcut.toUpperCase().charCodeAt( 0 ),
key: shortcut.toUpperCase(),
description: 'PDF export mode'
}, togglePdfExport );
installAltKeyBindings();
}install function · javascript · L86-L89 (4 LOC)Bayes2025summerLT/Biclustering0819_files/libs/revealjs/plugin/pdf-export/pdfexport.js
function install(){
installKeyBindings();
setStylesheet( isPrintingPDF() );
}page 1 / 12next ›