text
stringlengths
2
104M
meta
dict
{# Render tab content HTML for SPF navigation. Usage: pass $tab to this render pointing to an MTab (generated from a factory function usually, please see Rehike/Debugger/Debugger.php for more information.) @author Taniko Yamamoto ([email protected]) #} {% from "rehike/debugger/lightbox_main.twig" import dialog_tab_content %} {{ dialog_tab_content(tab) }}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
/** * Implements the core CSS for the Rehike debugger. * * TODO: Port this to SCSS for easier management. * * @author Taniko Yamamoto <[email protected]> * @author The Rehike Maintainers */ #rebug-lightbox .hid { display: none !important; } #rebug-open-button-container { position: fixed; bottom: 3px; right: 6px; z-index: 1000000002; } .rebug-open-button.condensed { display: none; } .rebug-open-button.condensed.rebug-open-button-has-error { display: inline-block; } .rebug-open-button-has-error { color: #a01312; text-shadow: 1px 1px rgba(0, 0, 0, 10%); opacity: 1; } .rebug-open-button-has-error .yt-uix-button-arrow { border-bottom-color: #a01312; } .rebug-open-button-has-error:hover { color: #c00; opacity: 1; } #rebug-lightbox-container { display: none; } #rebug-lightbox-container.open { display: block; } #rebug-main .yt-dialog-title { display: inline-block; } #rebug-main .rebug-history-button { margin-left: 15px; max-width: 300px; /** History button shouldn't be displayed in sick beta release! */ display: none; } .rebug-close-button-wrapper { position: absolute; top: 10px; right: 10px; } #rebug-tabs-switcher { float: left; } #rebug-tabs-switcher + #rebug-tabbed-content-wrapper { /** 175px (width of tabs) + 15px (spacing) */ margin-left: 190px; } .rebug-tab { min-width: 160px; padding: 4px 8px; cursor: pointer; } .rebug-tab:hover { background: #444; color: #fff; } .rebug-tab.rebug-tab-selected { background: #cc181e; color: #fff; font-weight: 500; text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.25); } .exp-invert-logo .rebug-tab.rebug-tab-selected { background: #f00; } .rebug-tab-content { /* Width is equal to (width of container - padding on both sides [20px * 2] - (width of tabs + padding [176px]) - left padding of parent [15px] - border width both sides [1px * 2]) Height is equal to (height of lightbox content - height of header [51px]) */ width: 373px; height: 335px; padding: 0; overflow-y: scroll; background: #fbfbfb; border: 1px solid #ededed; display: none; } .rebug-tab-content.rebug-tab-selected { display: block; } #rebug-lightbox .yt-dialog-content { /* Height of lightbox container - 20px */ height: 380px; } .rebug-expander { cursor: pointer; } @media screen and (min-width: 850px) { .rebug-tab-content { width: 573px; } } @media screen and (min-height: 650px) { .rebug-tab-content { height: 535px; } #rebug-lightbox .yt-dialog-content { height: 580px; } } @media screen and (min-width: 1050px) { .rebug-tab-content { width: 773px; } } @media screen and (min-height: 850px) { .rebug-tab-content { height: 735px; } #rebug-lightbox .yt-dialog-content { height: 780px; } } .nothing-to-see-renderer { font-size: 18px; color: #666; display: table; height: 100%; margin: 0 auto; } .nothing-to-see-renderer .text { max-width: 200px; vertical-align: middle; display: table-cell; } /* Errors */ .rebug-error-renderer .error-icon-warning, .rebug-error-renderer .error-icon-deprecated { background:no-repeat url(//s.ytimg.com/yts/imgbin/www-hitchhiker-vfllYIUv0.png) -67px -190px; background-size:auto; width:20px; height:21px } .rebug-error-renderer .error-icon-error { background:no-repeat url(//s.ytimg.com/yts/imgbin/www-hitchhiker-vfllYIUv0.png) -195px -725px; background-size:auto; width:20px; height:21px } .rebug-error-renderer .error-icon-notice { background:no-repeat url(//s.ytimg.com/yts/imgbin/www-hitchhiker-vfllYIUv0.png) -243px -799px; background-size:auto; width:20px; height:21px } .rebug-error-renderer { vertical-align: middle; padding: 5px; max-height: 30px; overflow: hidden; } .rebug-error-renderer .icon { display: block; position: relative; float: left; } .rebug-error-renderer-content { display: block; margin-left: 24px; margin-top: 3px; max-height: 17px; white-space:nowrap; overflow: hidden; text-overflow: ellipsis; } .rebug-error-renderer.rebug-expander-expanded { overflow: visible; max-height: none; } .rebug-error-renderer.rebug-expander-expanded .rebug-error-renderer-content { overflow: visible; text-overflow: none; white-space: initial; max-height: none; } .rebug-error-renderer.rebug-expander-expanded .collapsed-display { display: none; } .rebug-error-renderer.rebug-expander-expanded .expanded-display { display: block; } .rebug-error-renderer.rebug-expander-collapsed .collapsed-display { display: inline; } .rebug-error-renderer.rebug-expander-collapsed .expanded-display { display: none; } .rebug-error-renderer .file { opacity: 0.75; } .rebug-error-renderer .collapsed-display .file { float: right; } .rebug-error-renderer { border:1px solid rgba(0,0,0,.075); } .rebug-error-renderer.rebug-expander-expanded { box-shadow:0 0 0 #000,0 0 1px rgba(255,255,255,.25),inset 0 1px 3px rgba(0,0,0,.25); } .rebug-error-renderer.error-warning, .rebug-error-renderer.error-deprecated { background-color: #f5d562; color: #333; } .rebug-error-renderer.error-warning.rebug-expander-collapsed:hover, .rebug-error-renderer.error-deprecated.rebug-expander-collapsed:hover { background-color: #f4d87a; } .rebug-error-renderer.error-notice { background-color: #167ac6; color: #fff; } #rebug-help-link { font-size: 13px; font-weight: 400; margin-left: 8px; } .rebug-condensed #rebug-tab-content-error { display: block !important; } .rebug-tab-content .loading { display: block; text-align: center; height: 100%; } .rebug-tab-content .loading::before { content: ""; display: inline-block; height: 100%; vertical-align: middle; } .rebug-tab-content .loading .yt-spinner { display: inline-block; vertical-align: middle; } /* * IMPORTS */ {% include "rehike/debugger/css/global_walker.css.twig" %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
#rebug-lightbox .global-walker-container .items { font-family: Consolas, monospace; white-space: nowrap; } #rebug-lightbox .global-walker-container { height: 100%; } #rebug-lightbox .global-walker-item .item-header { position: relative; } #rebug-lightbox .global-walker-item > .item-header:hover { background: #cce7ff; } #rebug-lightbox .global-walker-item .item-header .toggle-icon { position: absolute; display: inline-block; } #rebug-lightbox .global-walker-item .toggle-icon { margin-top: 5px; margin-left: -13px; border: 1px solid transparent; border-left-color: #333; border-width: 4px 0 4px 4px; width: 0; height: 0; } #rebug-lightbox .global-walker-item.rebug-expander-expanded > .item-header > .toggle-icon { margin-top: 7px; margin-left: -15px; border: 1px solid transparent; border-top-color: #333; border-width: 4px 4px 0; width: 0; height: 0; } #rebug-lightbox .global-walker-container .rebug-expander { cursor: revert; } #rebug-lightbox .global-walker-container .rebug-expander-target { cursor: pointer; } #rebug-lightbox .global-walker-item .item-header, #rebug-lightbox .global-walker-item .expanded-display { padding-left: 22px; } #rebug-lightbox .global-walker-item.rebug-expander-collapsed > .expanded-display { display: none; } #rebug-lightbox .global-walker-item.rebug-expander-expanded > .item-header > .collapsed-display, #rebug-lightbox .global-walker-item.rebug-expander-expanded > .item-header > span > .collapsed-display { display: none; } #rebug-lightbox .global-walker-container .variable-name { color: #003699; font-weight: 700; } #rebug-lightbox .global-walker-container .type-string { color: #0a860a; } #rebug-lightbox .global-walker-container .type-string::before, #rebug-lightbox .global-walker-container .type-string::after, #rebug-lightbox .global-walker-container .children.is-associative > .global-walker-item > .item-header .variable-name::before, #rebug-lightbox .global-walker-container .children.is-associative > .global-walker-item > .item-header .variable-name::after { content: "\""; } #rebug-lightbox .global-walker-container .type-number, #rebug-lightbox .global-walker-container .type-bool, #rebug-lightbox .global-walker-container .type-name-display { color: #9e4aec; } #rebug-lightbox .global-walker-container .type-name-display { font-style: italic; } #rebug-lightbox .global-walker-container .array-length-display, #rebug-lightbox .global-walker-container .type-associative, #rebug-lightbox .global-walker-container .type-other { color: #666; font-style: italic; } #rebug-lightbox .global-walker-item .children > .global-walker-item { border-left: 2px solid #888; margin-left: -12px; padding-left: 9px; } #rebug-lightbox .global-walker-item .expanded-display > .brace { margin-left: -14px; }
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
/** * @fileoverview Provides widget controllers for Rebug. * * @author Taniko Yamamoto <[email protected]> * @author The Rehike Maintainers */ rebug.widgets = {}; /*{{ "*"~"/" }} {% include "rehike/debugger/js/widgets/OpenButton.js.twig" %} {% include "rehike/debugger/js/widgets/CloseButton.js.twig" %} {% include "rehike/debugger/js/widgets/Tab.js.twig" %} {% include "rehike/debugger/js/widgets/Expander.js.twig" %} {% include "rehike/debugger/js/widgets/ExpanderTarget.js.twig" %} //*/
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
/** * @fileoverview CSS class utilities for Rebug. * * @author Taniko Yamamoto <[email protected]> * @author The Rehike Maintainers */ rebug.class = {}; /** * Determine if an element has a class. * * @param {Element} element * @param {string} className * @return {boolean} */ rebug.class.has = function(element, className) { if ("" == className) return; if (element.classList) { return element.classList.contains(className) ? true : false; } else { return element.getAttribute("class").indexOf(className) > -1; } }; /** * Add a class to an element. * * @param {Element} element * @param {string} className */ rebug.class.add = function(element, className) { if ("" == className) return; if (element.classList) { element.classList.add(className); } else { element.setAttribute("class", element.getAttribute("class") + " " + className); } }; /** * Remove a class from an element. * * @param {Element} element * @param {string} className */ rebug.class.remove = function(element, className) { if ("" == className) return; if (element.classList) { element.classList.remove(className); } else { element.setAttribute("class", element.getAttribute("class").replace(className, "")); } };
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
/** * @fileoverview Implements scripts for the Rebug global variable viewer. * * @author Taniko Yamamoto <[email protected]> * @author The Rehike Maintainers */ rebug.globalWalker = {}; /** * True if the global walker is currently loaded at all. * * @private @type {boolean} */ rebug.globalWalker._isLoaded = false; /** * True if the global walker is the currently open * tab. * * @private @type {boolean} */ rebug.globalWalker._isCurrentlyVisited = false; /** * True if an SPF navigation has occurred. * * @private @type {boolean} */ rebug.globalWalker._hasSpfNavigated = false; /** * Stores a reference to the current root object. * * @type {?Object} */ rebug.globalWalker.currentRoot = null; /** * Implements the native JS templates for global walker v2. * * This includes a very basic templating engine in order to * efficiently render the content out. */ rebug.globalWalker.templates = { /** alias @const */ HAS_EXPANDER: true, /** * Create a HTML element. * * @param {string} tagName * @param {Object} options */ element: function(tagName, options) { var element = document.createElement(tagName); if (options.class) { for (var i = 0, j = options.class.length; i < j; i++) { rebug.class.add(element, options.class[i]); } } if (options.attrs) { for ( var keys = Object.keys(options.attrs), i = 0, j = keys.length; i < j; i++ ) { var key = keys[i], value = options.attrs[key]; element.setAttribute(key, value); } } if (options.children) { this.extractElementArray(element, options.children); } if (options.text) { element.appendChild(document.createTextNode(options.text)); } return element; }, /** * Create a HTML text node. * * @param {string} defaultText */ text: function(defaultText) { return document.createTextNode(defaultText); }, /** * Extract an element array (used to return multiple * elements internally) and append its contents to another * element. * * @param {Element} target * @param {Element[]|Element|string} elements */ extractElementArray: function(target, elements) { // Work even if the element provided is an Element // instead of an array. if (!Array.isArray(elements)) { elements = [elements]; } var el; for (var i = 0, j = elements.length; i < j; i++) { el = elements[i]; if (el instanceof Node) { target.appendChild(el); } else if ("string" == typeof el) { target.insertAdjacentHTML("beforeend", el); } } }, /** * Produce a typed item by name and data type. * * @param {string} name * @param {*} data * @return {Element|Element[]|string} */ itemFactory: function(name, data, path) { var type = typeof data; // For some fucking ungodly reason, whoever the fuck // made JavaScript decided that null, while literally being // one of the sole constructs in the entire fucking language that // does not have the properties of an object at all (it cannot // store its own properties nor methods, and it does not have // a prototype) have the type "object". // // Thus, typeof null == "object". Why??? I have no fucking clue. // But since this is the case, this causes a fatal error in // execution because the variable is handled as an object instead // of an unknown type as it should be. // // Average fucking programming language made by a homophobe if (null == data) type = "null"; var itemPath = path + "." + name; var attrs = rebug.globalWalker.getAttributes(itemPath); switch (type) { // In JS, arrays are types of objects. Thus, a check // needs to be done under this case. case "object": if (Array.isArray(data) || attrs.associativeArray) { if (data.length == 0) { return this.abstractItem( name, this.itemEmptyArrayHandler(name), "array" ); } else { return this.abstractItem( name, this.itemArrayHandler( name, itemPath, data, data.length || Object.keys(data).length, attrs.associativeArray || false ), "array", this.HAS_EXPANDER ); } } else { return this.abstractItem( name, this.itemObjectHandler( name, itemPath, data ), "object", this.HAS_EXPANDER ); } case "string": return this.abstractItem( name, this.itemStringHandler(name, data), "string" ); case "number": return this.abstractItem( name, this.itemNumberHandler(name, data) ); case "boolean": return this.abstractItem( name, this.itemBoolHandler(name, data) ); case "undefined": type = "null"; case "null": default: return this.abstractItem( name, this.itemUnknownHandler(name, type) ); } }, /** * Renders an array of elements from an array of variables. * * @param {Object|*[]} items * @return {Element[]} */ itemScene: function (items, path) { // Iteration must handled differently between standard // objects and arrays. var isArray = Array.isArray(items); var out = []; if (isArray) for (var i = 0, j = items.length; i < j; i++) { out.push(this.itemFactory(String(i), items[i], path)); } else for ( // iterate object by key/value var keys = Object.keys(items), i = 0, j = keys.length, key, value; i < j; i++ ) { key = keys[i], value = items[key]; out.push(this.itemFactory(key, value, path)); } return out; }, /** * Renders the base item wrapper. * * @param {string} name * @param {Element} subElement * @param {string} type * @param {boolean} hasExpander * * @return {Element} */ abstractItem: function(name, subElement, type, hasExpander) { var itemClasses = ["global-walker-item"]; if (hasExpander) { itemClasses.push("rebug-expander"); itemClasses.push("rebug-expander-has-target"); itemClasses.push("rebug-expander-collapsed"); } var el = this.element("div", { class: itemClasses, children: subElement }); if (hasExpander) el.isWalkerToggleable = true; return el; }, /** * Renders a base header wrapper. * * @param {string} name * @param {Element[]|Element} subElement * @param {boolean} hasExpander * @return {Element} */ abstractItemHeader: function(name, subElement, hasExpander) { var itemChildren = []; if (hasExpander) { itemChildren.push(this.element("span", { class: ["toggle-icon"] })); } itemChildren.push(this.element("span", { class: ["variable-name"], text: name })); itemChildren.push(this.element("span", { class: ["colon"], text: ": " })); var el = this.element("div", { class: [ "item-header", hasExpander ? "rebug-expander-target" : "" ], children: itemChildren }); this.extractElementArray(el, subElement); el.isWalkerToggleable = true; return el; }, /** * Renders an object item. * * @param {string} name * @param {string} path * @param {Object} data * * @return {Element[]} */ itemObjectHandler: function(name, path, data) { var attrs = rebug.globalWalker.getAttributes(path); var header = []; if (attrs.type) { // Get end of the type for short name var shortTypeName = attrs.type.split("\\"); shortTypeName = shortTypeName[shortTypeName.length - 1]; header.push(this.element("span", { class: [ "type-name-display", "yt-uix-tooltip" ], attrs: { "title": attrs.type, "data-tooltip-show-delay": "350" }, text: shortTypeName })); } header.push(this.element("span", { class: ["brace"], text: " {" })) header.push(this.element("span", { class: ["collapsed-display"], children: [ this.text(" ... "), this.element("span", { class: ["brace"], text: "}" }) ] })) var childrenEl = this.element("div", { class: ["children"] }); childrenEl.childrenObj = data; childrenEl.childrenPath = path; return [ this.abstractItemHeader( name, header, this.HAS_EXPANDER ), this.element("div", { class: ["expanded-display"], children: [ childrenEl, this.element("div", { class: ["brace"], text: "}" }) ] }) ]; }, /** * Render an array item. * * @param {string} name * @param {string} path * @param {*[]} data * @param {number} length Length of the array * @param {boolean} assoc Is the array associative? * * @return {Element[]} */ itemArrayHandler: function(name, path, data, length, assoc) { assoc = assoc || false; // ES3 doesn't support defaults var header = []; if (assoc) { header.push( this.element("span", { class: ["type-associative"], text: " assoc " }) ); } header.push( this.element("span", { class: ["brace"], text: "[" }) ); header.push( this.element("span", { class: ["collapsed-display"], children: [ this.element("span", { class: ["array-length-display"], text: " " + length + " " }), this.element("span", { class: ["brace"], text: "]" }) ] } )); var childrenEl = this.element("div", { class: [ "children", assoc ? "is-associative" : "" ] }); childrenEl.childrenObj = data; childrenEl.childrenPath = path; return [ this.abstractItemHeader(name, header, this.HAS_EXPANDER ), this.element("div", { class: ["expanded-display"], children: [ childrenEl, this.element("div", { class: ["brace"], text: "]" }) ] }) ]; }, /** * Renders an empty array view. * * @param {string} name * @return {Element[]} */ itemEmptyArrayHandler: function(name) { return this.abstractItemHeader(name, [ this.element("span", { class: ["brace"], text: "[" }), this.element("span", { class: ["array-length-display"], text: " empty " }), this.element("span", { class: ["brace"], text: "]" }), this.element("div", {class:["children"]}) ]); }, /** * Renders a string item. * * @param {string} name * @param {string} data * @return {Element} */ itemStringHandler: function(name, data) { return this.abstractItemHeader(name, this.element("span", { class: [ "type-string" ], text: String(data) } )); }, /** * Renders a number item. * * @param {string} name * @param {number} data * @return {Element} */ itemNumberHandler: function(name, data) { return this.abstractItemHeader(name, this.element("span", { class: [ "type-number" ], text: String(data) }) ); }, /** * Renders a boolean item. * * @param {string} name * @param {boolean} data * @return {Element} */ itemBoolHandler: function(name, data) { return this.abstractItemHeader(name, this.element("span", { class: [ "type-bool" ], text: data ? "true" : "false" }) ); }, /** * Renders a placeholder for unknown items. * * @param {string} name * @param {string} type * @return {Element} */ itemUnknownHandler: function(name, type) { return this.abstractItemHeader(name, this.element("span", { class: [ "type-other" ], text: String(type).toLowerCase() }) ); } }; /** * Get the attributes for a given data path. * * @param {string} path * @return {Object} */ rebug.globalWalker.getAttributes = function(path) { if (path in _rebugcfg.globalWalker.attr.yt) { return _rebugcfg.globalWalker.attr.yt[path]; } else { return {}; } }; /** * Render a view for a given object. * * @param {Object} obj Object to get a view for. * @param {string} path Path of the object as a string. * @return {?Element[]} */ rebug.globalWalker.getView = function(obj, path) { if (obj && "object" == typeof obj) { return rebug.globalWalker.templates.itemScene(obj, path); } else { return null; } }; /** * Render a view and dump its contents into an element. * * @param {Object} obj Object to load a view for. * @param {string} path Path of the object as a string. * @param {Element} target Element to dump the response into. */ rebug.globalWalker.loadView = function(obj, path, target) { var view = rebug.globalWalker.getView(obj, path); rebug.globalWalker.templates.extractElementArray(target, view); }; /** * Update the root scene with a new root. * * @param {Object} newRoot */ rebug.globalWalker.updateRootScene = function(newRoot) { var baseEl = document.querySelector("#rebug-tab-content-global_walker"); // Remove the loading scene (if it exists) if (!rebug.globalWalker._isLoaded) { var loadingEl = baseEl.querySelector(".loading"); rebug.class.add(loadingEl, "hid"); loadingEl.style.display = "none"; } var itemsEl = baseEl.querySelector(".global-walker-container .items"); // Remove any children if they exist while (itemsEl.children.length > 0) { itemsEl.children[0].remove(); } // Finally, render the scene. rebug.globalWalker.loadView( newRoot, "yt", itemsEl ); }; /** * Called in order to initialise the global walker view. */ rebug.globalWalker.loadInitialView = function() { var root = null; if (!rebug.globalWalker._hasSpfNavigated && window._rebugcfg && window._rebugcfg.globalWalker && window._rebugcfg.globalWalker.data && window._rebugcfg.globalWalker.data.yt ) { root = window._rebugcfg.globalWalker.data.yt; } else if (rebug.globalWalker._hasSpfNavigated) { root = rebug.globalWalker.currentRoot; } rebug.globalWalker.updateRootScene(root); rebug.globalWalker._isLoaded = true; }; /** * Open children of a global walker item if there is only one * child property of it. * * @param {Element} el */ rebug.globalWalker.tryOpenSubchildren = function(el) { if (1 == el.children.length && rebug.class.has(el.children[0], "rebug-expander")) { el.children[0].querySelector(".rebug-expander-target").click(); } }; /** * Handles any click that is recieved by a global walker item. * * @param {Object} data */ rebug.globalWalker.handleExpander = function(data) { var childrenEl = data.target.querySelector(".children"); if ("opened" == data.state && childrenEl && !childrenEl.childrenLoaded) { rebug.globalWalker.loadView( childrenEl.childrenObj, childrenEl.childrenPath, childrenEl ); childrenEl.childrenLoaded = true; rebug.globalWalker.tryOpenSubchildren(childrenEl); } }; /** * Runs whenever any expander is clicked. * * This is used to determine if the expander is a global * walker item expander, and nothing else. * * @private * @param {Object} data */ rebug.globalWalker._handleExpander = function(data) { if (data.target.isWalkerToggleable) { rebug.globalWalker.handleExpander(data); } }; /** * Called back whenever a history switch (i.e. SPF navigation) * occurs. * * @param {Object} data */ rebug.globalWalker.onHistorySwitch = function(data) { rebug.globalWalker.currentRoot = data.globalWalker.data.yt; if (rebug.globalWalker._isLoaded) { rebug.globalWalker.updateRootScene(rebug.globalWalker.currentRoot); } rebug.globalWalker._hasSpfNavigated = true; }; /** * Runs whenever the global walker tab is visited. * * @return {void} */ rebug.globalWalker.onVisit = function() { if (!rebug.globalWalker._isLoaded) { rebug.globalWalker.loadInitialView(); } if (!rebug.globalWalker._isCurrentlyVisited) { rebug.globalWalker._isCurrentlyVisited = true; } rebug.pubsub.subscribe( "rebug-expander-toggled", rebug.globalWalker._handleExpander ); }; /** * Runs whenever the tab is changed to another tab. * * @return {void} */ rebug.globalWalker.onExit = function() { rebug.globalWalker._isCurrentlyVisited = false; rebug.pubsub.unsubscribe( "rebug-expander-toggled", rebug.globalWalker._handleExpander ); }; /** * Handle any tab switch in order to check for when the tab * is switched to the global walker. * * @return {void} */ rebug.globalWalker.onTabSwitch = function() { if ("global_walker" == rebug.tabs.getCurrentId()) { rebug.globalWalker.onVisit(); } else if (rebug.globalWalker._isCurrentlyVisited) { rebug.globalWalker.onExit(); } }; rebug.pubsub.subscribe("rebug-tab-switch", rebug.globalWalker.onTabSwitch); rebug.pubsub.subscribe("rebug-history-switch", rebug.globalWalker.onHistorySwitch);
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
/** * @fileoverview Provides basic lightbox behaviours for Rebug. * * @author Taniko Yamamoto <[email protected]> * @author The Rehike Maintainers */ rebug.lightbox = {}; /** * Stores a reference to the lightbox container element. * * @type {Element} */ rebug.lightbox._lightboxContainer = null; /** * Opens the Rebug lightbox. */ rebug.lightbox.open = function() { var lightboxContainer = rebug.lightbox._lightboxContainer; // Create YT dialog background HTML rebug.lightbox._createDialogBackground(); // Unhide the lightbox rebug.class.add(lightboxContainer, "open"); // Alert any potential listeners to the new state. rebug.pubsub.publish("rebug-lightbox-opened"); }; /** * Closes the Rebug lightbox. */ rebug.lightbox.close = function() { var lightboxContainer = rebug.lightbox._lightboxContainer; // Remove the dialog background rebug.lightbox._removeDialogBackground(); // Hide the lightbox rebug.class.remove(lightboxContainer, "open"); // Alert any potential listeners to the new state. rebug.pubsub.publish("rebug-lightbox-closed"); }; /** * Creates the lightbox dialog background. * * @private */ rebug.lightbox._createDialogBackground = function() { rebug.util.scrollLock.enable(); rebug.class.add(document.body, "hide-players"); rebug.class.add(document.body, "yt-dialog-active"); // Create the dialog var bgdiv = document.createElement("DIV"); bgdiv.setAttribute("id", "yt-dialog-bg"); bgdiv.setAttribute("class", "yt-dialog-bg"); bgdiv.setAttribute("style", "height: 100%; width: 100%; position: fixed;"); document.body.insertBefore(bgdiv, ( document.getElementById("footer-container") || document.body.children[document.body.children.length - 1] ).nextSibling ); }; /** * Removes the dialog background. * * @private */ rebug.lightbox._removeDialogBackground = function() { // Remove the dialog and body classes rebug.class.remove(document.body, "hide-players"); rebug.class.remove(document.body, "yt-dialog-active"); document.getElementById("yt-dialog-bg").remove(); rebug.util.scrollLock.disable(); }; /** * Runs upon Rebug initialisation. * * @private */ rebug.lightbox._init = function() { rebug.lightbox._lightboxContainer = document.getElementById("rebug-lightbox-container") || null; }; rebug.pubsub.subscribe("rebug-init-finish", rebug.lightbox._init);
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
/** * Implements the event manager of the Rehike debugger. * * @author Taniko Yamamoto <[email protected]> * @author The Rehike Maintainers */ rebug.eventDelegate = {}; /** * Stores a map of event handlers. * * @type {Object[]} * @private */ rebug.eventDelegate._handlers = []; /** * Stores the names of all active events. * * @type {string[]} * @private */ rebug.eventDelegate._activeEvents = []; /** * Add a delegated event handler. * * @param {string} eventName * @param {string} className * @param {function(Event)} cb */ rebug.eventDelegate.add = function(eventName, className, cb) { if (!rebug.eventDelegate._isActiveEventName(eventName)) { rebug.util.events.add( document, eventName, rebug.eventDelegate._getDelegateHandler(eventName) ); rebug.eventDelegate._activeEvents.push(eventName); } rebug.eventDelegate._addHandler(eventName, className, cb); }; /** * Determine if an event already has an active handler by * its name. * * @param {string} name * @return {boolean} * * @private */ rebug.eventDelegate._isActiveEventName = function(name) { return rebug.eventDelegate._activeEvents.includes(name); }; /** * Generate a new event handler function. * * @param {string} eventName * @return {function(Event)} * * @private */ rebug.eventDelegate._getDelegateHandler = function(eventName) { return function(e) { var activeElement = e.target; var handlerClassNameList = rebug.eventDelegate._handlers[eventName]; while (null != activeElement) { if (activeElement.className) { var classes; if (activeElement.classList) { classes = activeElement.classList; } else { classes = activeElement.className.split(" "); } for (var i = 0, j = classes.length; i < j; i++) { if (classes[i] in handlerClassNameList) { return handlerClassNameList[classes[i]](activeElement, e); } else if ("rebug-no-propagate" == classes[i]) { return; } } } activeElement = activeElement.parentElement; } }; }; /** * Add a handler to the internal array. * * @param {string} eventName * @param {string} className * @param {function(Event)} cb * * @private */ rebug.eventDelegate._addHandler = function(eventName, className, cb) { if (!(eventName in rebug.eventDelegate._handlers)) { rebug.eventDelegate._handlers[eventName] = {}; } rebug.eventDelegate._handlers[eventName][className] = cb; };
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
/** * @fileoverview Provides common utils for Rebug. * * @author Taniko Yamamoto <[email protected]> * @author The Rehike Maintainers */ rebug.util = {}; rebug.util.scrollLock = {}; /** * Is scroll lock enabled? * * @private * @type {boolean} */ rebug.util.scrollLock._enabled = false; /** * The previous scroll height. * * @private * @type {number} */ rebug.util.scrollLock._previousScroll = 0; /** * A list of elements that were changed. * * @private * @type {Object[]} */ rebug.util.scrollLock._elements = []; /** * Info of the body when changed. * * @private * @type {Object} */ rebug.util.scrollLock._bodyInfo = null; /** * Get display information of an element for scroll locking it. * * @param {Element} element * @return {Object} */ rebug.util.scrollLock.getElementInfo = function(element) { var style = getComputedStyle(element); var info = { element: element, hasPreviousInlineStyle: element.hasAttribute("style"), previousInlineStyle: null, shouldModify: style.display == "none" ? false : true }; if (info.hasPreviousInlineStyle) { info.previousInlineStyle = element.getAttribute("style"); } return info; }; /** * Enable scroll lock. * * @return {void} */ rebug.util.scrollLock.enable = function() { if (rebug.util.scrollLock._enabled) return; // Get the original scroll position var originalScroll = document.documentElement.scrollTop; rebug.util.scrollLock._previousScroll = originalScroll; // Iterate all direct children of body and determine // if they should be acted upon. for (var i = 0, j = document.body.children.length; i < j; i++) { var el = document.body.children[i]; var info = rebug.util.scrollLock.getElementInfo(el); if (info.shouldModify) { rebug.util.scrollLock._elements.push(info); info.element.setAttribute( "style", ( (info.element.getAttribute("style") || "") + ";position:relative;top:-" + originalScroll + "px" ) ); } } // Finally, freeze the body itself in place. var bodyInfo = rebug.util.scrollLock.getElementInfo(document.body); rebug.util.scrollLock._bodyInfo = bodyInfo; // PATCH (dcooper): Required to not jump around visually if not already set on <html> document.documentElement.setAttribute( "style", ( (document.body.getAttribute("style") || "") + ";overflow-y:scroll" ) ); document.body.setAttribute( "style", ( (document.body.getAttribute("style") || "") + ";overflow:hidden" ) ); rebug.util.scrollLock._enabled = true; }; /** * Disable scroll lock. * * @return {void} */ rebug.util.scrollLock.disable = function() { if (!rebug.util.scrollLock._enabled) return; // Undo body changes (this must be done first to avoid // conflicts with children changes) var bodyInfo = rebug.util.scrollLock._bodyInfo; document.documentElement.removeAttribute("style"); if (bodyInfo.hasPreviousInlineStyle) { document.body.setAttribute("style", bodyInfo.previousInlineStyle); } else { document.body.removeAttribute("style"); } // And now iterate children to undo their property changes. var children = rebug.util.scrollLock._elements; for (var i = 0, j = children.length; i < j; i++) { var info = children[i]; if (info.hasPreviousInlineStyle) { info.element.setAttribute("style", info.previousInlineStyle); } else { info.element.removeAttribute("style"); } } rebug.util.scrollLock._elements = []; document.documentElement.scrollTop = rebug.util.scrollLock._previousScroll; rebug.util.scrollLock._enabled = false; }; rebug.util.events = {}; /** * Add an event listener. * * @param {Element} target * @param {string} name * @param {function(Event)} cb */ rebug.util.events.add = function(target, name, cb) { if (target.addEventListener) { target.addEventListener(name, cb); } else if (target.attachEvent) { target.attachEvent("on" + name, cb); } }; /** * Remove an event listener. * * @param {Element} target * @param {string} name * @param {function(Event)} cb */ rebug.util.events.remove = function(target, name, cb) { if (target.removeEventListener) { target.removeEventListener(name, cb); } else if (target.detachEvent) { target.detachEvent("on" + name, cb); } };
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
/** * @fileoverview Implements SPF handlers for Rebug. * * @author Taniko Yamamoto <[email protected]> * @author The Rehike Maintainers */ rebug.spf = {}; rebug.spf.events = {}; /** * Handle any SPF response. */ rebug.spf.events.onSpfDone = function(e) { if (e.detail && e.detail.response && e.detail.response.rebug_data) { var data = e.detail.response.rebug_data; rebug.spf.tryUpdateOpenButton(data.openButton); rebug.history.pushAndSwitch( data, e.detail.url, e.detail.response.title ); } }; /** * Attempt to replace the open button if it exists. * * @param {string} newHtml */ rebug.spf.tryUpdateOpenButton = function(newHtml) { var el = null; if (el = document.getElementById("rebug-open-button-container")) { rebug.spf.updateOpenButton(newHtml, el); } }; /** * Update the open button HTML to reflect changed state. * * @param {string} newHtml HTML to replace the button with. * @param {Element} openButton Open button container element. */ rebug.spf.updateOpenButton = function(newHtml, openButton) { openButton.innerHTML = newHtml; };
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
/** * @fileoverview Implements menus for Rebug. * * This is work in progress and currently unimplemented; I pushed * what was working early because I was sick. * * @author Taniko Yamamoto <[email protected]> * @author The Rehike Maintainers */ rebug.menu = {}; /** * Create a Menu. * * @return {rebug.menu.Menu} */ rebug.menu.create = function() { return new rebug.menu.Menu(); }; /** * @constructor */ rebug.menu.Menu = function() {}; /** * An array of menu items. * * @type {rebug.menu.MenuItem[]} */ rebug.menu.Menu.prototype.items = []; /** * Add a menu item by instance. * * @param {rebug.menu.MenuItem} item */ rebug.menu.Menu.prototype.addItemInstance = function(item) { this.items.push(item); }; /** * @constructor */ rebug.menu.MenuItem = function() {}; rebug.menu.MenuItem.prototype.onClick = function() {}; rebug.menu.templates = null; rebug.menu._onInit = function() { // Needs to be able to reference global walker // templates. rebug.menu.templates = { element: rebug.globalWalker.templates.element, text: rebug.globalWalker.templates.text, extractElementArray: rebug.globalWalker.templates.extractElementArray }; }; rebug.pubsub.subscribe("rebug-init-finish", rebug.menu._onInit);
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
/** * @fileoverview Implements the history manager for Rebug. * * @author Taniko Yamamoto <[email protected]> * @author The Rehike Maintainers */ rebug.history = {}; /** * Stores references to non-disposed registry entries. * * @private @type {rebug.history.DebuggerSnapshot[]} */ rebug.history._registry = []; /** * Stores a reference to the history button. * * @private @type {Element} */ rebug.history._historyButton = null; /** * Stores saved information about a particular debugger * page. * * @param {Object} data * @param {string} url * @param {string} title * * @constructor */ rebug.history.DebuggerSnapshot = function(data, url, title) { this.updatedTabs = {}; for (var keys = Object.keys(data), i = 0, j = keys.length; i < j; i++) { var key = keys[i], value = data[key]; this[key] = value; } if (url) this.url = url; if (title) this.title = title; }; /** * The title of the snapshot's page. * * @type {string} */ rebug.history.DebuggerSnapshot.prototype.title = ""; /** * The href to the particular snapshot. * * @type {string} */ rebug.history.DebuggerSnapshot.prototype.url = ""; /** * A list of tabs to be updated over HTML. * * @type {Object} */ rebug.history.DebuggerSnapshot.prototype.updatedTabs = {}; /** * Data updates specific to the global walker. * * @type {Object} */ rebug.history.DebuggerSnapshot.prototype.globalWalker = {}; /** * Push a new entry to the history store. * * @param {Object} data * @param {string} url * @param {string} title */ rebug.history.push = function(data, url, title) { url = url || ""; title = title || ""; rebug.history._addRegistry(data, url, title, false); }; /** * Push a new entry and switch to it. * * @param {Object} data * @param {string} url * @param {string} title */ rebug.history.pushAndSwitch = function(data, url, title) { url = url || ""; title = title || ""; rebug.history._addRegistry(data, url, title, true); }; /** * Switch to a history store entry. * * @param {number} index */ rebug.history.switch = function(index) { var snapshot = rebug.history.getEntryByIndex(index); rebug.history._switchToSnapshot(snapshot); }; /** * Get a registry entry by its index. * * @param {number} index */ rebug.history.getEntryByIndex = function(index) { var registry = rebug.history._registry; if (registry[index]) { return registry[index]; } else { return null; } }; /** * Add a page to the registry. * * @param {Object} data * @param {string} url * @param {string} title * @param {boolean} switchTo (switch is an illegal variable name) * * @private */ rebug.history._addRegistry = function(data, url, title, switchTo) { switchTo = switchTo || false; var registry = rebug.history._registry; var newEntry = new rebug.history.DebuggerSnapshot(data, url, title); registry.unshift(newEntry); if (switchTo) { // Newest item will always be the 0th item in this array. rebug.history.switch(0); } }; /** * Switch to a snapshot. * * @param {rebug.history.DebuggerSnapshot} snapshot */ rebug.history._switchToSnapshot = function(snapshot) { rebug.pubsub.publish("rebug-history-switch", snapshot); rebug.history._updateTabs(snapshot.updatedTabs); // Because of laziness, this is the easiest way to prevent // multiple tabs from rendering at the same time because // of desynchronised client/server state: rebug.tabs.switchTab(rebug.tabs.getCurrentId()); }; /** * Update server-side rendered tabs with their new content. * * @param {Object} tabs * @private */ rebug.history._updateTabs = function(tabs) { for (var keys = Object.keys(tabs), i = 0, j = keys.length; i < j; i++) { var id = keys[i], tab = tabs[id]; rebug.history._updateTab(id, tab.title, tab.html); } }; /** * Update a tab's title and HTML. * * @param {string} id * @param {string} title * @param {string} html * * @private */ rebug.history._updateTab = function(id, title, html) { var tabEl = rebug.tabs.getTabById(id); var contentEl = rebug.tabs.getContentById(id); if (tabEl && contentEl) { tabEl.innerHTML = title; contentEl.outerHTML = html; } }; /** * Runs whenever the history button is clicked. * * @private */ rebug.history._onClickHistoryButton = function() { }; /** * Set up the initial page, which requires some special * treatment to save. * * @private */ rebug.history._setupInitialPage = function() { if (window._rebugcfg && window._rebugcfg.HISTORY_RAW_UPDATE_TAB_IDS) { var tabIds = window._rebugcfg.HISTORY_RAW_UPDATE_TAB_IDS; var title = document.querySelector("head title").innerHTML || ""; var url = window.location.href; var snapshot = new rebug.history.DebuggerSnapshot({}, url, title); for (var i = 0, j = tabIds.length; i < j; i++) { var id = tabIds[i]; snapshot.updatedTabs[id] = { title: rebug.tabs.getTitleById(id), html: rebug.tabs.getContentById(id).outerHTML }; snapshot.globalWalker = window._rebugcfg.globalWalker; snapshot.openButton = document.getElementById("rebug-open-button-container") .innerHTML ; } rebug.history._registry.push(snapshot); } }; /** * Runs upon Rebug initialisation. * * @private */ rebug.history._onRebugInit = function() { rebug.history._historyButton = document.querySelector(".rebug-history-button"); rebug.eventDelegate.add( "click", "rebug-history-button", rebug.history._onClickHistoryButton ); rebug.history._setupInitialPage(); }; rebug.pubsub.subscribe("rebug-init-finish", rebug.history._onRebugInit);
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
/** * @fileoverview Implements network handlers for rebug. * * @author Taniko Yamamoto <[email protected]> * @author The Rehike Maintainers */ rebug.network = {}; /** * Stores previous network captures. * * @type {rebug.history.DebuggerSnapshot[]} */ rebug.network._captures = []; /** * Add a response to the capture store. * * @param {Object} capture */ rebug.network.addCapture = function(capture) { rebug.network._captures.push(capture); }; /** * Modifies a request to make it request Rebug info (under certain * circumstances). * * @param {Object} request * @private */ rebug.network._modifyRequest = function(request) { var spfPos = -1; // Don't want to modify any foreign requests obviously! if (request.url.indexOf(window.location.origin) != 0) { return; } // Modifying SPF requests is redundant in this case. if ((spfPos = request.url.indexOf("spf")) > -1) { var prevChar = request.url.charAt(spfPos - 1); if ("?" == prevChar || "&" == prevChar) { return; } } // Lazy if (request.url.indexOf("?") > -1) { request.url += "&"; } else { request.url += "?"; } request.url += "rebug_get_info=1"; }; /** * Modifies the contents of a response if they have Rebug info. * * @param {Object} request * @param {Object} response * * @private */ rebug.network._modifyResponse = function(request, response) { if (response.headers["x-rebug-get-info"]) { var data = JSON.parse(response.data); rebug.network.addCapture(data); response.headers["content-type"] = data.content_type; response.data = data.response; response.text = data.response; } }; /** * Sets up xhook for intercepting AJAX. * * @private */ rebug.network._setupXhook = function() { window.xhook.enable(); window.xhook.before(rebug.network._modifyRequest); window.xhook.after(rebug.network._modifyResponse); }; /** * Runs on Rebug initialisation. * * @private */ rebug.network._onRebugInit = function() { rebug.network._setupXhook(); }; rebug.pubsub.subscribe("rebug-init-finish", rebug.network._onRebugInit);
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
/** * @fileoverview Simple publish-subscription messaging. * * @author Taniko Yamamoto <[email protected]> * @author The Rehike Maintainers */ rebug.pubsub = {}; rebug.pubsub._subscriptions = {}; /** * Subscribe to a topic. * * @export * * @param {string} topic * @param {Function} cb * @return {void} */ rebug.pubsub.subscribe = function(topic, cb) { if (topic && cb) { rebug.pubsub._ensureOpenScope(topic); rebug.pubsub._subscriptions[topic].push(cb); } else { rebug.debug.error("rebug.pubsub.subscribe", "Invalid call to rebug.pubsub.subscribe()."); } }; /** * Unsubscribe from a topic. * * @export * * @param {string} topic * @param {Function} cb * @return {void} */ rebug.pubsub.unsubscribe = function(topic, cb) { if (topic && cb) { rebug.pubsub._ensureOpenScope(topic); var subscriptions = rebug.pubsub._subscriptions[topic]; for (var i = 0, j = subscriptions.length; i < j; i++) { if (cb == subscriptions[i]) { subscriptions[i] = null; } } } else { rebug.debug.error("rebug.pubsub.unsubscribe", "Invalid call to rebug.pubsub.unsubscribe()."); } }; /** * Publish a topic. * * @export * * @param {string} topic * @param {*} extraData * @return {void} */ rebug.pubsub.publish = function(topic, extraData) { extraData = extraData || null; var subscriptions; if (topic && rebug.pubsub._subscriptions[topic]) { subscriptions = rebug.pubsub._subscriptions[topic]; for (var i = 0, j = subscriptions.length; i < j; i++) if (null != subscriptions[i]) { if (null != extraData) { subscriptions[i](extraData); } else { subscriptions[i](); } } } else if (topic) {} // Shouldn't error if there are no subscribers else { rebug.debug.error("rebug.pubsub.publish", "Missing topic in call or registration."); } }; /** * Remove a topic. * * @export * * @param {string} topic * @return {void} */ rebug.pubsub.clear = function(topic) { var subscriptions = rebug.pubsub._subscriptions[topic]; // Unsubscribe all listeners as to not cause a rift in spacetime. for (var i = 0, j = subscriptions.length; i < j; i++) { rebug.pubsub.unsubscribe(topic, subscriptions[i]); } delete rebug.pubsub._subscriptions[topic]; }; // // Declare private API // /** * Open a new topic scope in the pubsub subscriptions array. * * @private * * @param {string} topic * @return {void} */ rebug.pubsub._ensureOpenScope = function(topic) { rebug.pubsub._subscriptions[topic] = rebug.pubsub._subscriptions[topic] || []; };
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
/** * Implements the base JS for the Rehike debugger. * * @author Taniko Yamamoto <[email protected]> * @author The Rehike Maintainers */ var _rebug = _rebug || {}; (function(rebug) { rebug.debug = {}; /** * Throw an error if something goes wrong. * * @param {string} namespaceOrMessage * @param {string|null} message */ rebug.debug.error = function(namespaceOrMessage, message) { message = message || null; if (namespaceOrMessage && "string" == typeof message) { var namespace = namespaceOrMessage; throw new Error("[rebug:" + namespace + "] " + message); } else { throw new Error("[rebug] " + message); } }; /*{{ "*"~"/" }} {###################################################### # IMPORTS. # # # # The order in which these are added doesn't matter # # too much, since the JS interpreter will resolve # # function declarations regardless of their order. # # # # By the way, that little mess above this comment's # # a hack to get the IDE to display right with these # # Twig imports. # # # ######################################################} {% include "rehike/debugger/js/polyfill/Array.includes.js.twig" %} {% include "rehike/debugger/js/polyfill/Element.remove.js.twig" %} {% include "rehike/debugger/js/class.js.twig" %} {% include "rehike/debugger/js/util.js.twig" %} {% include "rehike/debugger/js/event_delegate.js.twig" %} {% include "rehike/debugger/js/pubsub.js.twig" %} {% include "rehike/debugger/js/lightbox.js.twig" %} {% include "rehike/debugger/js/tabs.js.twig" %} {% include "rehike/debugger/js/menu.js.twig" %} {% include "rehike/debugger/js/history.js.twig" %} {% include "rehike/debugger/js/network.js.twig" %} {% include "rehike/debugger/js/spf.js.twig" %} {% include "rehike/debugger/js/global_walker.js.twig" %} {% include "rehike/debugger/js/widgets.js.twig" %} //*/ function init() { // Register events for clicking the open button. rebug.eventDelegate.add( "click", "rebug-open-button", rebug.widgets.OpenButton.onClick ); rebug.eventDelegate.add( "click", "rebug-close-button", rebug.widgets.CloseButton.onClick ); rebug.eventDelegate.add( "click", "rebug-tab", rebug.widgets.Tab.onClick ); rebug.eventDelegate.add( "click", "rebug-expander", rebug.widgets.Expander.onClick ); rebug.eventDelegate.add( "click", "rebug-expander-target", rebug.widgets.ExpanderTarget.onClick ); if (window.ytspf && window.ytspf.enabled) { // Register SPF event handlers rebug.util.events.add( document, "spfdone", rebug.spf.events.onSpfDone ); } rebug.pubsub.publish("rebug-init-finish"); } init(); })(_rebug)
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
/** * @fileoverview Provides tab behaviours for Rebug. * * @author Taniko Yamamoto <[email protected]> * @author The Rehike Maintainers */ rebug.tabs = {}; /** * Get the currently active tab. * * @return {Element} */ rebug.tabs.getCurrent = function() { return document.querySelector("#rebug-tabs-switcher .rebug-tab-selected") || null; }; /** * Get the currently active tab's content. * * @return {Element} */ rebug.tabs.getCurrentContent = function() { return document.querySelector("#rebug-tabbed-content-wrapper .rebug-tab-selected") || null; }; /** * Get the currently active tab's ID. * * @return {string} */ rebug.tabs.getCurrentId = function() { var tab = rebug.tabs.getCurrent(); if (!tab) return ""; return tab.getAttribute("data-tab-target") || ""; }; /** * Get a tab's element by its ID. * * @param {string} id * @return {Element} */ rebug.tabs.getTabById = function(id) { return document.querySelector("#rebug-tabs-switcher [data-tab-target='" + id + "']") || null; }; /** * Get a tab's title by its ID. * * @param {string} id * @return {string} */ rebug.tabs.getTitleById = function(id) { return rebug.tabs.getTabById(id).innerHTML; }; /** * Get a tab's content by its ID. * * @param {string} id * @return {Element} */ rebug.tabs.getContentById = function(id) { return document.querySelector("#rebug-tabbed-content-wrapper [data-tab-id='" + id + "']"); }; /** * Switch to a tab. * * @param {string} tabId */ rebug.tabs.switchTab = function(tabId) { rebug.tabs._clearSelectedTab(); var tab = rebug.tabs.getTabById(tabId); var content = rebug.tabs.getContentById(tabId); if (tab) rebug.class.add(tab, "rebug-tab-selected"); if (content) rebug.class.add(content, "rebug-tab-selected"); rebug.pubsub.publish("rebug-tab-switch"); }; /** * Clear the currently selected tab. * * @private */ rebug.tabs._clearSelectedTab = function() { var tab = rebug.tabs.getCurrent(); var content = rebug.tabs.getCurrentContent(); if (tab) rebug.class.remove(tab, "rebug-tab-selected"); if (content) rebug.class.remove(content, "rebug-tab-selected"); };
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
rebug.widgets.CloseButton = {}; rebug.widgets.CloseButton.onClick = function() { rebug.lightbox.close(); };
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
rebug.widgets.OpenButton = {}; rebug.widgets.OpenButton.onClick = function() { rebug.lightbox.open(); };
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
rebug.widgets.ExpanderTarget = {}; rebug.widgets.ExpanderTarget.onClick = function(elm, targetElement) { // Find parent and trigger its expander for (var parent = elm; null != parent; parent = parent.parentElement) { if (rebug.class.has(parent, "rebug-expander")) { rebug.widgets.Expander.onClick(parent, targetElement, true); return; } } throw new Error("Failed to find parent of expander target of " + elm); };
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
rebug.widgets.Expander = {}; rebug.widgets.Expander.onClick = function(elm, targetElement, noTargetCheck) { noTargetCheck = noTargetCheck || false; if (rebug.class.has(elm, "rebug-expander-has-target") && !noTargetCheck) { return; } if (rebug.class.has(elm, "rebug-expander-collapsed")) { rebug.class.remove(elm, "rebug-expander-collapsed"); rebug.class.add(elm, "rebug-expander-expanded"); rebug.pubsub.publish("rebug-expander-toggled", { state: "opened", target: elm }); } else { rebug.class.remove(elm, "rebug-expander-expanded"); rebug.class.add(elm, "rebug-expander-collapsed"); rebug.pubsub.publish("rebug-expander-toggled", { state: "closed", target: elm }); } };
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
rebug.widgets.Tab = {}; rebug.widgets.Tab.onClick = function(elm) { var a; if (a = elm.getAttribute("data-tab-target")) { rebug.tabs.switchTab(a); } };
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
if (!Element.prototype.remove) { Element.prototype.remove = function() { if (this.parentNode) { this.parentNode.removeChild(this); } } }
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
if(!Array.prototype.includes){ //or use Object.defineProperty Array.prototype.includes = function(search){ return !!~this.indexOf(search); } } if(!Array.prototype.indexOf){ Array.prototype.indexOf = (function(Object, max, min){ "use strict"; return function indexOf(member, fromIndex) { if(this===null||this===undefined)throw TypeError("Array.prototype.indexOf called on null or undefined"); var that = Object(this), Len = that.length >>> 0, i = min(fromIndex | 0, Len); if (i < 0) i = max(0, Len+i); else if (i >= Len) return -1; if(member===void 0){ for(; i !== Len; ++i) if(that[i]===void 0 && i in that) return i; // undefined }else if(member !== member){ for(; i !== Len; ++i) if(that[i] !== that[i]) return i; // NaN }else for(; i !== Len; ++i) if(that[i] === member) return i; // all else return -1; // if the value was not found, then return -1 }; })(Object, Math.max, Math.min); }
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{% extends "core.twig" %} {% set appbarEnabled = true %} {% set defaultGuideVisibility = false %} {% set defaultAppbarVisibility = false %} {% set enableSnapScaling = true %} {% set flexWidthSnapDisabled = true %} {% block head_css %} {% import 'core/macros.twig' as core %} {{ core.css("www-account-settings") }} {{ core.css("www-creatorpage") }} <style> {% include "rehike/config/css.twig" %} </style> {% endblock %} {% block content %} {% embed "common/creator/creator_page.twig" %} {% from "common/creator/creator_sidebar.twig" import render as creator_sidebar %} {% block creator_page_class %}account-page{% endblock %} {% block creator_page_sidebar %} {{ creator_sidebar(yt.page.sidebar.creatorSidebarRenderer) }} {% endblock %} {% block creator_page_content_class %}account-settings-container{% endblock %} {% macro checkbox_renderer(this) %} <label> <span class="rehike-config-option rehike-config-option-bool yt-uix-form-input-checkbox-container {{ this.checked ? "checked" }}" data-cfg-name="{{ this.name }}" data-original-value="{{ this.checked ? 'true' : 'false' }}"> {# Weird display bug occurs here #} <input type="checkbox" class="yt-uix-form-input-checkbox setting-checkbox"{{ this.checked ? ' checked="checked"' }}> <span class="yt-uix-form-input-checkbox-element"></span> </span> {{ this.title }} {% if this.subtitle %} <p class="setting-reminder"> {{ this.subtitle }} </p> {% endif %} </label> {% endmacro %} {% macro select_renderer(this) %} {{ this.label }} <span class="rehike-config-option rehike-config-option-enum yt-uix-form-input-select" data-cfg-name="{{ this.name }}" data-original-value="{{ this.selectedValue }}"> <span class="yt-uix-form-input-select-content"> <span class="yt-uix-form-input-select-arrow yt-sprite"></span> <span class="yt-uix-form-input-select-value"></span> </span> <select class="yt-uix-form-input-select-element setting-dropdown-list" aria-label="{{ this.label }}"> {% for value in this.values %} <option value="{{ value.value }}"{{ value.selected ? ' selected=""' }}>{{ value.text }}</option> {% endfor %} </select> </span> {% endmacro %} {% block creator_page_content %} <div class="ytg-fl account-container"> <div class="account-header"> <h1>{{ yt.page.content.title }}</h1> </div> <hr class="yt-horizontal-rule"> <form id="rehike-config-form" onsubmit="event.preventDefault();return!1"> <div class="account-content"> <div class="account-section rehike-config-options-container"> {% for option in yt.page.content.contents %} <div class="account-section-setting"> {% if option.checkboxRenderer %} {{ _self.checkbox_renderer(option.checkboxRenderer) }} {% elseif option.selectRenderer %} {{ _self.select_renderer(option.selectRenderer) }} {% endif %} </div> {% endfor %} </div> <hr class="yt-horizontal-rule"> <div class="account-footer"> {% from "common/uix/button.twig" import render as button %} {{ button(yt.page.content.saveButton, null, "rehike-config-save-button") }} </div> </div> </form> </div> <script> {% include "rehike/config/js.twig" %} </script> <script> rehike.config.init(); </script> {% endblock %} {% endembed %} {% endblock %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
.account-footer { height: 20px; margin: 0 -25px -40px; padding: 0 0 24px 25px; } #rehike-config-form .yt-horizontal-rule { margin: 0 -25px 20px; } .setting-reminder { font-style: normal; margin-left: 25px; } .yt-uix-form-input-select { margin-left: 6px; } #rehike-config-save-button { float: right; margin-right: 24px; margin-top: -2px; }
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
/** * @fileoverview Implements the base JS for the Rehike config manager. * * @author Daylin Cooper <[email protected]> * @version 1.0 */ (function(){ /*{{ "*"~"/" }} {###################################################### # IMPORTS. # ######################################################} var rebug = {}; {% include "rehike/debugger/js/class.js.twig" %} {% include "rehike/debugger/js/util.js.twig" %} {% include "rehike/debugger/js/event_delegate.js.twig" %} {% include "rehike/debugger/js/pubsub.js.twig" %} //*/ var rehike = window.rehike || {}; rehike.config = {}; /** * @private * @type {Element[]} */ rehike.config.props_ = []; /** * @private * @type {Object} */ rehike.config.modifications_ = {}; /** * @private * @type {Element} */ rehike.config.saveButton_ = null; /** * Initialise the config manager. * * @return {void} */ rehike.config.init = function() { var container = document.querySelector('.rehike-config-options-container'); var props = container.querySelectorAll('.rehike-config-option'); for (var i = 0, j = props.length; i < j; i++) { rehike.config.props_.push(props[i]); } rebug.eventDelegate.add('change', 'rehike-config-option-bool', rehike.config.onModifyBool_); rebug.eventDelegate.add('change', 'rehike-config-option-enum', rehike.config.onModifyEnum_); rebug.eventDelegate.add('click', 'rehike-config-save-button', rehike.config.submit_); rehike.config.saveButton_ = document.querySelector( '.rehike-config-save-button'); }; window.rehike = window.rehike || {}; window.rehike.config = window.rehike.config || {}; window.rehike.config.init = rehike.config.init; /** * Called whenever a boolean is modified. * * @private * * @param {Element} prop * @return {void} */ rehike.config.onModifyBool_ = function(prop) { var name = prop.getAttribute('data-cfg-name'); var isChecked = rebug.class.has(prop, 'checked'); rehike.config.modifyProp_(name, isChecked); }; /** * Called whenever an enum is modified. * * @private * * @param {Element} prop * @return {void} */ rehike.config.onModifyEnum_ = function(prop) { var name = prop.getAttribute('data-cfg-name'); var value = prop.querySelector('select').value; rehike.config.modifyProp_(name, value); }; /** * Called whenever a property element is modified. * * @private * * @param {string} prop * @param {*} value * * @return {void} */ rehike.config.modifyProp_ = function(prop, value) { rehike.config.saveButton_.disabled = false; rehike.config.modifications_[prop] = value; }; /** * Submit the modified configuration and reload the page * to reflect the changes. */ rehike.config.submit_ = function() { var json = JSON.stringify(rehike.config.modifications_); var xhr = new XMLHttpRequest(); xhr.open('POST', '/rehike/update_config'); xhr.onload = function() { if (xhr.status == 200) { location.reload(); } }; xhr.setRequestHeader('Content-Type', 'application/json') xhr.send(json); }; })();
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{%- macro render(data) -%} {% import "common/uix/button.twig" as button %} <div class="yt-alert yt-alert-{{ data.buttons or data.hasCloseButton ? "actionable" : "default" }} yt-alert-{{ data.type }}"> <div class="yt-alert-icon"> <span class="icon master-sprite yt-sprite"></span> </div> <div class="yt-alert-content"> {%- if data.text -%} <div class="yt-alert-message"> {{ data.text }} </div> {%- endif -%} </div> {%- if data.buttons or data.hasCloseButton -%} <div class="yt-alert-buttons"> {{ button.render({ size: "default", style: "close", class: [ "close", "yt-uix-close" ], accessibilityLabel: "Close", customAttributes: { "data-close-parent-class": "yt-alert" }, content: { runs: [ { text: "Close" } ] } }) }} </div> {%- endif -%} </div> {%- endmacro -%}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{% macro renderOLD(data) %} {% from "common/uix/watch_later_button.twig" import render as watch_later %} {% set info = data.info %} {% if getVideoTime(info) != null %} <span class="video-time">{{ getVideoTime(info) }}</span> {% endif %} {%- if getWLOverlay(info) != null -%} {{ watch_later(getWLOverlay(info), info.videoId) }} {%- endif -%} {% set percentWatched = getWatchedPercent(info) %} {% if percentWatched != null %} <span class="resume-playback-background"></span> <span class="resume-playback-progress-bar" style="width:{{ percentWatched }}%"></span> {% endif %} {% endmacro %} {% macro render(overlays, id, includeTime = true) %} {% for overlay in overlays %} {% if overlay.thumbnailOverlayTimeStatusRenderer and includeTime %} <span class="video-time"> {{ rehike.getText(overlay.thumbnailOverlayTimeStatusRenderer.text) }} </span> {% elseif overlay.thumbnailOverlayToggleButtonRenderer.untoggledIcon.iconType == "WATCH_LATER" %} {% from "common/uix/watch_later_button.twig" import render as watch_later %} {{ watch_later(overlay.thumbnailOverlayToggleButtonRenderer, id) }} {% elseif overlay.thumbnailOverlayResumePlaybackRenderer %} <span class="resume-playback-background"></span> <span class="resume-playback-progress-bar" style="width:{{ overlay.thumbnailOverlayResumePlaybackRenderer.percentDurationWatched }}%"></span> {% endif %} {% endfor %} {% endmacro %} {% macro time(overlays) %} {% for overlay in overlays %} {% if overlay.thumbnailOverlayTimeStatusRenderer %} <span class="video-time"> {{ rehike.getText(overlay.thumbnailOverlayTimeStatusRenderer.text) }} </span> {% endif %} {% endfor %} {% endmacro %} {% macro playlist(data, span = false) %} {% set info = data.info %} <{{ span ? "span" : "div" }} class="sidebar"> <span class="yt-pl-sidebar-content yt-valign"> <span class="yt-valign-container"> <span class="formatted-video-count-label"> {% if data.type == "radio" %} <b>50+</b> videos {# TODO: i18n #} {% else %} {% for run in info.thumbnailText.runs %} {% if run.bold == true %} <b> {% endif %} {{ run.text }} {% if run.bold == true %} </b> {% endif %} {% endfor %} {% endif %} </span> <span class="yt-pl-icon {{ data.type == "radio" ? "yt-pl-icon-mix" }} yt-pl-icon-reg yt-sprite"></span> </span> </span> </{{ span ? "span" : "div" }}> <{{ span ? "span" : "div" }} class="yt-pl-thumb-overlay"> <span class="yt-pl-thumb-overlay-content"> {% set overlay = rehike.getThumbnailOverlay(info, "thumbnailOverlayHoverTextRenderer") %} <span class="play-icon yt-sprite"></span> <span class="yt-pl-thumb-overlay-text">{{ rehike.getText(overlay.text) }}</span> </span> </{{ span ? "span" : "div" }}> {% endmacro %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{%- macro render(data) -%} {%- from "core/html/img.twig" import img -%} <span class="video-thumb {% for class in data.class %}{{ class ~ " " }}{% endfor %} yt-thumb yt-thumb-{{ data.width }}"> <span class="yt-thumb-{{ data.type }}"> <span class="yt-thumb-clip"> {{ img({ src: data.image, width: data.width, height: data.height, ytImg: data.delayload, delayload: data.delayload, onload: data.delayload ? ";window.__ytRIL && __ytRIL(this)" : null }) }} <span class="vertical-align"></span> </span> </span> </span> {%- endmacro -%}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{# Implements the render behaviour for InnerTube browse responses. #} {%- macro render(data) -%} {% from "common/browse/section_list.twig" import render as section_list %} {% from "common/browse/browse_list_item_container.twig" import render as browse_list_item_container %} {% from "common/channels4/channel_about_metadata.twig" import render as channel_about_metadata %} {% from "common/channels4/browse_content_grid.twig" import render as browse_content_grid %} {% from "common/channels4/branded_page_v2_subnav.twig" import render as branded_page_v2_subnav %} <ul id="browse-items-primary"> {% if data.brandedPageV2SubnavRenderer %} {{ branded_page_v2_subnav(data.brandedPageV2SubnavRenderer) }} {% endif %} {%- if data.sectionListRenderer -%} {{ section_list(data.sectionListRenderer) }} {%- elseif data.channelAboutMetadataRenderer -%} {{ channel_about_metadata(data.channelAboutMetadataRenderer) }} {%- elseif data.browseContentGridRenderer -%} {{ browse_content_grid(data.browseContentGridRenderer) }} {%- elseif data.backstageRenderer -%} {% from "common/comments/comment_section_renderer.twig" import render as comment_section_renderer %} <li><div class="branded-page-box-padding">{{ comment_section_renderer(data.backstageRenderer) }}</div></li> {%- elseif data.items -%} {{ browse_list_item_container(data) }} {%- endif -%} </ul> {% set last = data.items|last %} {% if last.continuationItemRenderer %} {% from 'common/uix/load_more_button.twig' import render as load_more_button %} {{ load_more_button(last.continuationItemRenderer.continuationEndpoint.continuationCommand.token, "browse-items-primary") }} {% endif %} {%- endmacro -%}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{%- macro render(data) -%} {% from "common/browse/item_section.twig" import render as item_section %} {% set rid = generateRid() %} <ol id="section-list-{{ rid }}" class="section-list"> {%- for item in data.contents -%} {%- if item.itemSectionRenderer -%} <li>{{ item_section(item.itemSectionRenderer) }}</li> {%- elseif item.messageRenderer -%} <li> <p class="display-message"> {%- set text = item.messageRenderer.subtext.messageSubtextRenderer.text ?? item.messageRenderer.text -%} {%- if text.runs -%} {%- for run in text.runs -%} {%- if run.navigationEndpoint -%} <a href="{{ rehike.getUrl(run) }}">{{ run.text }}</a> {%- else -%} {{ run.text }} {%- endif -%} {%- endfor -%} {%- elseif text.simpleText -%} {{ text.simpleText }} {%- endif -%} </p> </li> {%- endif -%} {%- endfor -%} </ol> {% set last = data.contents|last %} {% if last.continuationItemRenderer %} {% from 'common/uix/load_more_button.twig' import render as load_more %} {{ load_more(last.continuationItemRenderer.continuationEndpoint.continuationCommand.token, "section-list-" ~ rid) }} {% endif %} {%- endmacro -%}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{%- macro render(data, id) -%} {% import "common/uix/lockup.twig" as lockup %} {%- for item in data.items -%} {%- if item.gridVideoRenderer or item.videoRenderer or item.gridPlaylistRenderer or item.playlistRenderer or item.gridRadioRenderer or item.radioRenderer or item.gridChannelRenderer or item.channelRenderer -%} <li class="feed-item-container yt-section-hover-container browse-list-item-container branded-page-box vve-check "> <div class="feed-item-dismissable "> <div class="feed-item-main feed-item-no-author"> <div class="feed-item-main-content"> {{ lockup.tile(item) }} </div> </div> </div> <div class="feed-item-dismissal-notices"> <div class="feed-item-dismissal feed-item-dismissal-hide hid"> This item has been hidden </div> </div> </li> {%- endif -%} {%- endfor -%} {%- endmacro -%}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{%- macro render(data) -%} <div class="feed-item-container browse-list-item-container yt-section-hover-container compact-shelf shelf-item branded-page-box clearfix "> <div class="feed-item-dismissable"> {{ _self.title(data) }} {%- if data.content.horizontalListRenderer -%} {{ _self.compact(data.content.horizontalListRenderer) }} {# Why the fuck is this different than horizontalListRenderer??? #} {%- elseif data.content.horizontalMovieListRenderer -%} {{ _self.compact(data.content.horizontalMovieListRenderer) }} {%- elseif data.content.expandedShelfContentsRenderer -%} {{ _self.expanded(data.content.expandedShelfContentsRenderer) }} {% elseif data.content.gridRenderer %} {{ _self.multirow(data.content.gridRenderer) }} {%- endif -%} </div> <div class="feed-item-dismissal-notices"></div> </div> {%- endmacro -%} {% macro compact(data) %} {% import "common/uix/lockup.twig" as lockup %} <div class="compact-shelf yt-uix-shelfslider yt-uix-shelfslider-at-head"> <div class="yt-uix-shelfslider-body yt-viewport"> <ul class="yt-uix-shelfslider-list"> {%- for item in data.items -%} <li class="yt-shelf-grid-item yt-uix-shelfslider-item {{ item.channelRenderer or item.gridChannelRenderer ? "channels-content-item channel-shelf-item" }}"> {{ lockup.grid(item) }} </li> {% endfor %} </ul> </div> <button class="yt-uix-button yt-uix-button-size-default yt-uix-button-shelf-slider-pager yt-uix-shelfslider-prev" type="button" onclick=";return false;"> <span class="yt-uix-button-content"> <span data-tooltip-text="{{ yt.msgs.shelfsliderPrev }}" aria-label="{{ yt.msgs.shelfsliderPrev }}" class="yt-uix-shelfslider-prev-arrow yt-uix-tooltip yt-sprite"></span> </span> </button> <button class="yt-uix-button yt-uix-button-size-default yt-uix-button-shelf-slider-pager yt-uix-shelfslider-next" type="button" onclick=";return false;"> <span class="yt-uix-button-content"> <span data-tooltip-text="{{ yt.msgs.shelfsliderNext }}" aria-label="{{ yt.msgs.shelfsliderNext }}" class="yt-uix-shelfslider-next-arrow yt-uix-tooltip yt-sprite"></span> </span> </button> </div> {% endmacro %} {% macro expanded(data) %} {% import "common/uix/lockup.twig" as lockup %} <div class="expanded-shelf"> <ul class="expanded-shelf-content-list has-multiple-items"> {%- for item in data.items -%} <li class="expanded-shelf-content-item-wrapper"> <div class="expanded-shelf-content-item"> {{ lockup.tile(item) }} </div> </li> {%- endfor -%} </ul> </div> {% endmacro %} {% macro multirow(data) %} {% import "common/uix/lockup.twig" as lockup %} <div class="multirow-shelf"> {% if data.isCollapsible %} <div class="yt-uix-expander yt-uix-expander-collapsed"> {% endif %} <ul id="grid-{{ generateRid() }}" class="shelf-content"> {% for item in data.items %} <li class="yt-shelf-grid-item"> {{ lockup.grid(item) }} </li> {% endfor %} </ul> {% if data.isCollapsible %} <div class="yt-uix-expander-head"> <span class="multirow-shelf-expander">{{ rehike.getText(data.showMoreText) }}</span> <span class="multirow-shelf-collapser">{{ rehike.getText(data.showFewerText) }}</span> </div> </div> {% endif %} </div> {% endmacro %} {%- macro title(data) -%} {%- from "core/html/img.twig" import img -%} <h2 class="branded-page-module-title shelf-title-cell"> {%- if data.endpoint -%} <a href="{{ data.endpoint.commandMetadata.webCommandMetadata.url }}" class="branded-page-module-title-link spf-link "> {% endif %} {%- if data.thumbnail -%} <div class="yt-lockup-thumbnail"> <div class="yt-thumb video-thumb"> <span class="yt-thumb-simple"> {{img({ width: 20, height: 20, onload: ";window.__ytRIL && __ytRIL(this)", delayLoad: true, ytImg: 1, ariaHidden: "false", src: rehike.getThumb(data.thumbnail) })}} </span> </div> </div> {% endif %} <span class="branded-page-module-title-text">{{ rehike.getText(data.title) }}</span> {% if data.endpoint %} </a> {% endif %} {% if data.badges %} <span class="shelf-featured-badge">{{ data.badges[0].metadataBadgeRenderer.label }}</span> {% endif %} {%- if data.titleAnnotation -%} <span class="shelf-annotation shelf-title-annotation"> {{ rehike.getText(data.titleAnnotation) }} </span> {% endif %} </h2> {% if data.subtitle %} <div class="shelf-description yt-ui-ellipsis yt-ui-ellipsis-2">{{ rehike.getText(data.subtitle) }}</div> {% endif %} <div class="menu-container shelf-title-cell"> {% if data.menu %} <div class="yt-uix-menu-container feed-item-action-menu"> {% if data.menu.menuRenderer.topLevelButtons %} <ul class="yt-uix-menu-top-level-button-container"> {% from "common/uix/button.twig" import render as button %} {% for button in data.menu.menuRenderer.topLevelButtons %} {% set btn = button.buttonRenderer %} <li class="yt-uix-menu-top-level-button yt-uix-menu-top-level-flow-button"> {{ button(btn, (btn.style == "STYLE_OPACITY" and btn.isSelected) ? "blue-text" : null) }} </li> {% endfor %} </ul> {% endif %} </div> {% endif %} </div> {%- endmacro -%}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{%- macro render(data) -%} {% from "common/browse/shelf.twig" import render as shelf %} {% from "common/channels4/video_player_view_component.twig" import render as video_player_view_component %} {% import "common/uix/lockup.twig" as lockup %} {% set rid = generateRid() %} <ol id="item-section-{{ rid }}" class="item-section"> {%- for item in data.contents -%} {%- if item.shelfRenderer -%} {{ shelf(item.shelfRenderer) }} {%- elseif item.messageRenderer -%} <li> <p class="display-message"> {%- set text = item.messageRenderer.subtext.messageSubtextRenderer.text ?? item.messageRenderer.text -%} {%- if text.runs -%} {%- for run in text.runs -%} {%- if run.navigationEndpoint -%} <a href="{{ rehike.getUrl(run) }}">{{ run.text }}</a> {%- else -%} {{ run.text }} {%- endif -%} {%- endfor -%} {%- elseif text.simpleText -%} {{ text.simpleText }} {%- endif -%} </p> </li> {%- elseif item.channelVideoPlayerRenderer -%} <li> {{ video_player_view_component(item.channelVideoPlayerRenderer) }} </li> {%- elseif item.channelFeaturedContentRenderer -%} <li> <div class="c4-featured-content branded-page-box"> <div class="yt-uix-slider yt-section-hover-container" data-disabled-slider-buttons="true"> <div class="yt-uix-slider-body"> <ul class="yt-uix-slider-list"> {{ lockup.tile(item.channelFeaturedContentRenderer.items[0], 288, 162, { type: "li", class: [ "featured-content-item", "fluid" ] }) }} </ul> </div> </div> </div> </li> {%- elseif item.videoRenderer or item.playlistRenderer or item.radioRenderer or item.channelRenderer -%} <li class="feed-item-container yt-section-hover-container browse-list-item-container branded-page-box vve-check "> <div class="feed-item-dismissable "> <div class="feed-item-main feed-item-no-author"> <div class="feed-item-main-content"> {{ lockup.tile(item) }} </div> </div> </div> <div class="feed-item-dismissal-notices"> <div class="feed-item-dismissal feed-item-dismissal-hide hid"> This item has been hidden </div> </div> </li> {%- elseif item.gridVideoRenderer or item.gridPlaylistRenderer or item.gridRadioRenderer or item.gridChannelRenderer -%} <li class="channels-content-item yt-shelf-grid-item {{ item.gridChannelRenderer ? "channel-shelf-item" }}">{{ lockup.grid(item) }}</li> {%- endif %} {%- endfor -%} </ol> {%- endmacro -%}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{% macro render(nav) %} <div id="appbar-nav" class="appbar-content-hidable"> {% if nav.owner %} <a href="{{ nav.owner.href }}"> <img class="appbar-nav-avatar" src="{{ nav.owner.thumbnail }}" title="{{ nav.owner.title }}" alt="{{ nav.owner.title }}" height="23" width="23"> </a> {% endif %} <ul class="appbar-nav-menu"> {%- for item in nav.items -%} <li> {%- if item.selected or item.status == 2 -%} <h2 class="epic-nav-item-heading" aria-selected="true"> {{ item.title }} </h2> {% else %} <a href="{{ item.href }}" class="yt-uix-button {{ item.status == 1 ? "partially-selected" }} spf-link yt-uix-button-epic-nav-item yt-uix-button-size-default" aria-selected="false"> <span class="yt-uix-button-content">{{ item.title }}</span> </a> {% endif %} </li> {% endfor %} </ul> </div> {% endmacro %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{# Implements the appbar guide wrapper. This automatically builds a guide with the constant index yt.appbar.guide. Since yt is unrestricted, don't be an idiot. You can easily break everything if you're not careful. This is applicable to far much more than the guide. @author Taniko Yamamoto ([email protected]) @author The Rehike Maintainers #} {% from "common/guide/main.twig" import render as guide %} <div id="guide" class="yt-scrollbar"> {# Implements the actual appbar guide menu #} <div id="appbar-guide-menu" class="appbar-menu appbar-guide-menu-layout appbar-guide-clickable-ancestor yt-uix-scroller yt-uix-tdl" role="navigation"> {{ guide(yt.appbar.guide) }} </div> {# Implements the appbar guide notifications wrapper. This is currently only managed on a templater level. #} <div id="appbar-guide-notifications" class="hid"> {% set strings = yt.appbar.guideNotificationStrings %} {{ _self.appbar_guide_notification_template( "watch-later-video-added", strings.watchLaterVideoAdded ) }} {{ _self.appbar_guide_notification_template( "watch-later-video-removed", strings.watchLaterVideoRemoved ) }} {{ _self.appbar_guide_notification_template( "subscription", strings.subscription ) }} {{ _self.appbar_guide_notification_template( "unsubscription", strings.unsubscription ) }} {{ _self.appbar_guide_notification_template( "playlist-like", strings.playlistLike ) }} {{ _self.appbar_guide_notification_template( "playlist-unlike", strings.playlistUnlike ) }} {{ _self.appbar_guide_notification_template( "playlist-video-added", strings.playlistVideoAdded ) }} {{ _self.appbar_guide_notification_template( "playlist-video-removed", strings.playlistVideoRemoved ) }} {{ _self.appbar_guide_notification_template( "video-like", strings.videoLike ) }} {{ _self.appbar_guide_notification_template( "video-unlike", strings.videoUnlike ) }} {{ _self.appbar_guide_notification_template( "event-reminder-set", strings.eventReminderSet ) }} {{ _self.appbar_guide_notification_template( "event-reminder-removed", strings.eventReminderRemoved ) }} </div> {# Implements appbar guide item templates Ignore some of the markup here like the hrefOverride property, as these are specific only to this implementation. They should be avoided elsewhere. #} <div id="appbar-guide-item-templates" class="hid"> {{ _self.appbar_guide_item_template("playlist", { "idOverride": "__ID__", "titleOverride": "__TITLE__", "icon": {"iconType": "PLAYLISTS"}, "hrefOverride": "__URL__", "appbarGuideNotification": { "label": strings.playlistLike, "template": "__NOTIFICATION_OVERLAY_MESSAGE__" } }) }} {{ _self.appbar_guide_item_template("mix", { "idOverride": "__ID__", "titleOverride": "__TITLE__", "icon": {"iconType": "MIX"}, "hrefOverride": "__URL__", "appbarGuideNotification": { "label": strings.playlistLike, "template": "__NOTIFICATION_OVERLAY_MESSAGE__" } }) }} {{ _self.appbar_guide_item_template("channel", { "idOverride": "__ID__", "titleOverride": "__TITLE__", "thumbnail": { "thumbnails": [ { url: "__THUMBNAIL_URL__" } ] }, "hrefOverride": "__URL__", "appbarGuideNotification": { "label": strings.subscription, "template": "__NOTIFICATION_OVERLAY_MESSAGE__" } }) }} </div> </div> {# Generates a notification with the given text. #} {% macro appbar_guide_notification(text) %} <div class="appbar-guide-notification " role="alert"><span class="appbar-guide-notification-content-wrapper yt-valign"><span class="appbar-guide-notification-icon yt-sprite"></span><span class="appbar-guide-notification-text-content" >{{ text }}</span></span></div> {% endmacro %} {# Creates an inline template wrapper with the given content. #} {% macro inline_template_wrapper(id, content) %} <div id="{{ id }}"> <!-- {{ content }} --> </div> {% endmacro %} {# Creates an inline notification template. #} {% macro appbar_guide_notification_template(type, text) %} {{ _self.inline_template_wrapper( "appbar-guide-notification-" ~ type, _self.appbar_guide_notification(text) ) }} {% endmacro %} {# Creates an inline guide item template. #} {% macro appbar_guide_item_template(type, data) %} {% from "common/guide/guide_entry.twig" import render as guide_entry %} {{ _self.inline_template_wrapper( "appbar-guide-item-template-" ~ type, guide_entry(data) ) }} {% endmacro %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{% from "common/uix/button.twig" import render as button %} <h3 class="signin-clickcard-header">{{ data.heading }}</h3> <div class="signin-clickcard-message"> {{ data.message }} </div> {{ button(data.button) }}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{%- from "common/uix/button.twig" import render as button -%} <div id="yt-masthead-high-priority-notification-content"></div> <div id="yt-masthead-notifications-header"> <span id="yt-masthead-notifications-title">{{ data.title }}</span> {{ button(data.button) }} </div> <div id="yt-masthead-notifications-content" class="yt-uix-scroller"></div>
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{%- from "common/uix/button.twig" import render as button -%} {%- for item in data.items -%} <div id="yt-masthead-creation-{{ item.type }}"> {{ button(item) }} </div> {%- endfor -%}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{%- from "common/thumb.twig" import render as thumb -%} {%- from "common/uix/button.twig" import render as button -%} <a href="{{ rehike.getUrl(data.email) }}" class="yt-masthead-picker-header yt-masthead-picker-active-account"> {{ rehike.getText(data.email) }} </a> <div id="yt-unlimited-member"></div> <div class="yt-masthead-picker-body"> <a href="{{ rehike.getUrl(data.photo) }}" class="yt-masthead-picker-photo-wrapper"> {{ thumb(data.photo.thumb) }} <span class="yt-masthead-picker-photo-change">{{ rehike.getText(data.photo) }}</span> </a> <div class="yt-masthead-picker-info"> <div class="yt-masthead-picker-name" dir="ltr"> {{ data.username }} </div> <div id="yt-subscriber-count" class="yt-masthead-picker-account-subtitle"> {{ data.subCount }} </div> {%- for btn in data.buttons -%} {{ button(btn) }} {%- endfor -%} </div> </div> <div id="yt-masthead-mulitlogin" class="yt-masthead-multilogin-users"> <div id="yt-delegate-accounts"></div> </div> <div id="yt-channel-switcher-link" class="clearfix"></div> <div class="yt-masthead-picker-footer clearfix"> {%- for btn in data.footer -%} {{ button(btn) }} {%- endfor -%} </div>
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{%- macro render(data, id) -%} {% import "common/uix/lockup.twig" as lockup %} {% from 'common/uix/load_more_button.twig' import render as load_more_button %} {# ID is always needed for continuations, so create an anonymous ID for anonymous use. #} {% if not id %} {% set id = "channels-browse-content-grid" %} {% endif %} <ul id="{{ id }}" class="channels-browse-content-grid branded-page-gutter-padding grid-lockups-container"> {%- for item in data.items -%} {%- if item.gridVideoRenderer or item.videoRenderer or item.gridPlaylistRenderer or item.playlistRenderer or item.gridRadioRenderer or item.radioRenderer or item.gridChannelRenderer or item.channelRenderer -%} <li class="channels-content-item yt-shelf-grid-item {{ item.channelRenderer or item.gridChannelRenderer ? "channel-shelf-item" }}">{{ lockup.grid(item) }}</li> {%- endif -%} {%- endfor -%} </ul> {% set lastItem = data.items|last %} {%- if lastItem.continuationItemRenderer -%} {{ load_more_button(lastItem.continuationItemRenderer.continuationEndpoint.continuationCommand.token, id) }} {%- endif -%} {%- endmacro -%}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{# A common template to be embedded for Branded Page v2 renderers, which are used by channels and feeds. See implementation in /channels.twig for an example. #} <div class="{% apply spaceless %} branded-page-v2-container {{ brandedPageConfig.baseBoldTitles ? 'branded-page-base-bold-titles' }} {{ brandedPageConfig.containerFlexWidth ? 'branded-page-v2-container-flex-width' }} {{ brandedPageConfig.hasTopRow ? 'branded-page-v2-has-top-row' }} {{ brandedPageConfig.secondaryColumnHidden ? 'branded-page-v2-secondary-column-hidden' }} {% endapply %}"> {% if brandedPageConfig.hasTopRow %} <div class="branded-page-v2-top-row"> {%- block branded_page_top_row -%} {% endblock %} </div> {% endif %} <div class="branded-page-v2-col-container"> <div class="branded-page-v2-col-container-inner"> <div class="branded-page-v2-primary-col"> <div class=" yt-card clearfix"> <div class="branded-page-v2-body branded-page-v2-primary-column-content" id=""> {%- block branded_page_primary_column_content -%} {% endblock %} </div> </div> </div> {%- if not brandedPageConfig.secondaryColumnHidden -%} <div class="branded-page-v2-secondary-col"> {%- block branded_page_secondary_column_content -%} {%- endblock -%} </div> {%- endif -%} </div> </div> </div>
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{% macro render(data) %} {% import "common/uix/lockup.twig" as lockup %} <div class="video-player-view-component branded-page-box"> <div class="video-content clearfix "> <div class="c4-player-container c4-flexible-player-container"> <div class="c4-flexible-height-setter"></div> <div id="upsell-video" class="c4-flexible-player-box" data-video-id="{{ data.videoId }}" data-swf-config="{{ _self.swfConfig(data)|e }}"></div> </div> <div class="video-detail "> <h3 class="title yt-ui-ellipsis yt-ui-ellipsis-2"> <a class="spf-link" href="{{ rehike.getUrl(data.title.runs.0) }}">{{ rehike.getText(data.title) }}</a> </h3> <div class="view-count"> <span class="count">{{ rehike.getText(data.viewCountText) }}</span> <span class="content-item-time-created">{{ rehike.getText(data.publishedTimeText) }}</span> </div> <div class="description yt-uix-expander yt-uix-expander-ellipsis yt-ui-ellipsis-10 yt-uix-expander-collapsed"> <div class="yt-ui-ellipsis yt-ui-ellipsis-10"> {% import "common/watch/watch7/action_panel/details.twig" as watch %} {{ watch.description(data.description) }} <a class="yt-uix-expander-head">{{ yt.msgs.showLess }}</a> </div> <a class="yt-uix-expander-head">{{ rehike.getText(data.readMoreText) }}</a> </div> </div> <div class="video-content-info"></div> </div> </div> {% endmacro %} {% macro swfConfig(data) %} {"args":{"c":"WEB","watermark":",https://s.ytimg.com/yts/img/watermark/youtube_watermark-vflHX6b6E.png,https://s.ytimg.com/yts/img/watermark/youtube_hd_watermark-vflAzLcD6.png","loaderUrl":"/channel/{{ yt.ucid }}","length_seconds":"135","title":"{{ rehike.getText(data.title) }}","innertube_api_version":"v1","player_error_log_fraction":"1.0","profile_picture":"https://yt3.ggpht.com/a-/AAuE7mAPBVgUYqlLw9SvJyKAVWmgkQ2-KrkgSv4_5A=s88-mo-c-c0xffffffff-rj-k-no","token":"1","ssl":"1","xhr_apiary_host":"youtubei.youtube.com","cr":"GB","apiary_host":"","allow_embed":"1","iv_invideo_url":"https://www.youtube.com/annotations_invideo?cap_hist=1&video_id={{ data.videoId }}&client=1","thumbnail_url":"https://i.ytimg.com/vi/{{ data.videoId }}/default.jpg","apiary_host_firstparty":"","tmi":"1","innertube_api_key":"AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8","fmt_list":"18/640x360,36/320x180,17/176x144","cver":"2.20220303.01.01","itct":"","vss_host":"s.youtube.com","enabled_engage_types":"3,6,4,5,17,1","ldpj":"-13","iv_load_policy":"1","tag_for_child_directed":false,"relative_loudness":"1","host_language":"en","no_get_video_log":"1","hl":"en_US","innertube_context_client_version":"1.20180501","fflags":"{% include "player/flags.twig" %}","t":"1","timestamp":"{{ "now"|date("U") }}","account_playback_token":"QUFFLUhqbUU0RWkzaDUxZFBYNkZ5MlpOYk1rRjFlN29SUXxBQ3Jtc0trQ1pUUkJiTW9DV3J4bkNSTUN4b0ZSUHVBRFhfQjBmUGE5V1JoUFl6VDFlNFZNSVNCZmpzSFJEUHZycFpCa1RNSzJ0OF8xRXM0YzVwVUFiQlVYOEpvYUhLY1dLbC1LS3pSeGtkOTBpbHFvMFV0RWdpTQ==","fexp":"23710476,23721898,23726563,23727194,23733019,23736391,23744176,23751767,23752869,23755886,23755898,23758087,23758152,23760559,23761607,23761855,23762649,23762715,23766074,23772104,23772974,23774273,23778819,23781081,23781140,23781335,23781383,23782999,23783326,23783342,23783454,23784106,23784106,23784572,23784582,23785342,9449243,9471235,9474466,9475648,9485000","ucid":"{{ yt.ucid }}","gapi_hint_params":"m;/_/scs/abc-static/_/js/k=gapi.gapi.en.BstDmEhpa_Q.O/rt=j/d=1/rs=AHpOoo-oqKdOJIcyAi5YyA6pahSkp_ojsw/m=__features__","el":"profilepage","external_play_video":"1","player_response":{{ data.playerResponse|json_encode|raw }},"avg_rating":"4.65843629837","video_id":"{{ data.videoId }}","idpj":"-7","iv3_module":"1","allow_ratings":"1"},"attrs":{"id":"c4-player"},"assets":{"css":"{{ yt.playerConfig.baseCssUrl }}","js":"{{ yt.playerConfig.baseJsUrl }}"},"params":{"allowfullscreen":"true","allowscriptaccess":"always","bgcolor":"#000000"},"sts":{{ yt.playerConfig.signatureTimestamp }},"url":"","html5":true} {% endmacro %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{% macro render(data) %} <li> <div class="about-metadata-container"> <div class="about-metadata-stats branded-page-box-padding"> <div class="about-stats"> {% if data.subscriberCountText %} <span class="about-stat"> {{ _self.formatStat(data.subscriberCountText.runs) }} </span> {% endif %} <span class="about-stat"> {{ data.subscriberCountText ? " • " }}{{ _self.formatStat(data.viewCountText.runs) }} </span> <br> <span class="about-stat">{{ data.joinedDateText }}</span> </div> </div> {% if data.description %} <div class="about-metadata-label branded-page-box-padding"> <span>{{ data.descriptionLabel }}</span> </div> <div class="about-description branded-page-box-padding"> <pre> {{ rehike.getText(data.description) }} </pre> </div> {% endif %} {% if data.country %} <div class="about-metadata-label about-metadata-label-border-top branded-page-box-padding"> <span>{{ data.detailsLabel }}</span> </div> <div class="country-container branded-page-box-padding"> <span class="country-label">{{ data.countryLabel }}</span> <span class="country-inline">{{ data.country }}</span> </div> {% endif %} {% if data.primaryLinks %} <div class="about-metadata-label about-metadata-label-border-top branded-page-box-padding"> <span>{{ data.linksLabel }}</span> </div> <div class="about-metadata branded-page-box-padding clearfix"> <ul class="about-custom-links"> {% for link in data.primaryLinks %} {{ _self.aboutLink(link) }} {% endfor %} </ul> </div> {% endif %} </div> </li> {% endmacro %} {% macro formatStat(runs) %} {% for run in runs %} {% if run.bold %} <b>{{ run.text }}</b> {% else %} {{ run.text }} {% endif %} {% endfor %} {% endmacro %} {# @private #} {% macro aboutLink(info) %} <li class="channel-links-item"> <a href="{{ info.navigationEndpoint.commandMetadata.webCommandMetadata.url }}" class="about-channel-link"> <img src="{{ info.icon.thumbnails[0].url }}" alt="" class="about-channel-link-icon" width="16" height="16" alt="{{ this.commandMetadata.webCommandMetadata.url }}"> <span class="about-channel-link-text">{{ rehike.getText(info.title) }}</span> </a> </li> {% endmacro %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{% macro render(data) %} <li class="branded-page-gutter-padding branded-page-v2-subnav-container clearfix"> {# Right side buttons are reversed to account for CSS float behaviour. They will be displayed in the correct order. #} {% for button in data.rightButtons|reverse %} {{ _self.subnav_menu_button(button) }} {% endfor %} {% if data.backButton %} <a aria-label="{{ data.backButton.accessibilityLabel }}" class="yt-uix-button yt-uix-button-default yt-uix-button-size-default sub-menu-back-button yt-uix-button-empty yt-uix-button-has-icon spf-link" href="{{ data.backButton.href }}"><span class=yt-uix-button-icon-wrapper><span class="yt-sprite yt-uix-button-icon yt-uix-button-icon-channel-back"></span></span></a> {% endif %} {% if data.title %} <span class="branded-page-module-title"> {{ data.title }} </span> {% endif %} {% for button in data.leftButtons %} {{ _self.subnav_menu_button(button) }} {% endfor %} </li> {% endmacro %} {# Implemented separately from the button buttons because of its unique markup. It's likely the channels4 developers designed it in a similar way. #} {% macro subnav_menu_button(data) %} <button aria-expanded="false" aria-haspopup="true" class="yt-uix-button yt-uix-button-default yt-uix-button-size-default subnav-{{ data.type }}-menu" data-button-menu-indicate-selected="true" onclick="return!1" type="button"> <span class="yt-uix-button-content">{{ data.title }}</span> <span class="yt-sprite yt-uix-button-arrow"></span> <ul aria-haspopup="true" class="hid yt-uix-button-menu yt-uix-button-menu-default" role="menu"> {% for item in data.items %} <li role="menuitem"> <span class="spf-link yt-uix-button-menu-item" href="{{ item.href }}" onclick='return yt.window.navigate(this.getAttribute("href")),!1'> {{ item.title }} </span> {% endfor %} </ul> </button> {% endmacro %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{% macro render(header, secondary) %} <div class="branded-page-v2-header channel-header yt-card"> {% if secondary %} <div class="secondary-header-contents"> {% for link in secondary.links %} <a href="{{ link.url }}" class="secondary-header-action" role="menuitem" target="_blank"> {% if link.icon %} <span class="header-action-icon {{ link.icon }}-icon yt-sprite"></span> {% endif %} <span class="nav-text">{{ link.text }}</span> </a> {% endfor %} </div> {% endif %} <div id="gh-banner"> <style> #c4-header-bg-container { background-image: url({{ header.banner.image }}); } @media screen and (-webkit-min-device-pixel-ratio: 1.5), screen and (min-resolution: 1.5dppx) { #c4-header-bg-container { background-image: url({{ header.banner.hdImage }}); } } #c4-header-bg-container .hd-banner-image { background-image: url({{ header.banner.hdImage }}); } </style> <div id="c4-header-bg-container" class="c4-visible-on-hover-container {{ header.banner.isCustom ? "has-custom-banner" }}"> {% if header.nonexistentMessage %} <div class="banner-message channel-empty-message"> <h2>{{ header.nonexistentMessage }}</h2> </div> {% else %} <div class="hd-banner"> <div class="hd-banner-image "></div> </div> <div id="header-links"> {% if header.headerLinks.secondaryLinks %} <ul class="about-secondary-links"> {% for item in header.headerLinks.secondaryLinks %} <li class="channel-links-item"> <a href="{{ item.href }}" rel="me nofollow" target="_blank" title="{{ rehike.getText(item.title) }}" class="about-channel-link yt-uix-redirect-link about-channel-link-with-icon"> <img src="{{ item.icon.thumbnails.0.url }}" class="about-channel-link-favicon" alt="" width="16" height="16"> </a> </li> {% endfor %} </ul> {% endif %} {% if header.headerLinks.primaryLinks %} <ul class="about-custom-links"> {% for item in header.headerLinks.primaryLinks %} <li class="channel-links-item"> <a href="{{ item.href }}" rel="me nofollow" target="_blank" title="{{ rehike.getText(item.title) }}" class="about-channel-link yt-uix-redirect-link about-channel-link-with-icon"> <img src="{{ item.icon.thumbnails.0.url }}" class="about-channel-link-favicon" alt="" width="16" height="16"> <span class="about-channel-link-text"> {{ rehike.getText(item.title) }} </span> </a> </li> {% endfor %} </ul> {% endif %} </div> {% endif %} <a class="channel-header-profile-image-container spf-link" href="{{ header.url }}"> <img class="channel-header-profile-image" src="{{ header.thumbnail }}" title="{{ header.title.text }}" alt="{{ header.title.text }}"> </a> </div> </div> <div class="primary-header-contents clearfix " id="c4-primary-header-contents"> <div class="primary-header-upper-section-wrapper clearfix"> <div class="primary-header-upper-section"> <div class="primary-header-upper-section-block"> <h1 class="branded-page-header-title"> <span class="qualified-channel-title ellipsized {{ header.badges ? "has-badge" }}"> {% apply spaceless %} <span class="qualified-channel-title-wrapper"> <span dir="ltr" class="qualified-channel-title-text"> <a dir="ltr" href="{{ header.title.href }}" class="spf-link branded-page-header-title-link yt-uix-sessionlink" title="{{ header.title.text }}" data-sessionlink="ei=PYD4WYi3NtLY-AOXuqv4Aw" > {{ header.title.text }} </a> </span> </span> {% if header.badges %} <a href="//support.google.com/youtube/answer/3046484?hl=en" target="_blank" class="qualified-channel-title-badge"> <span aria-label="{{ yt.msgs.verified }}" class="yt-channel-title-icon-verified yt-uix-tooltip yt-sprite" data-tooltip-text="{{ yt.msgs.verified }}"></span> </a> {% endif %} {% endapply %} </span> </h1> </div> <div class="primary-header-upper-section-block"> <div class="primary-header-actions"> {% import "common/uix/subscription_button.twig" as subscription_button %} {% if header.subscriptionButton %} {{ subscription_button.render(header.subscriptionButton, "channel-header-subscription-button-container") }} {% endif %} </div> </div> </div> </div> </div> <div id="channel-subheader" class="clearfix branded-page-gutter-padding appbar-content-trigger"> <ul id="channel-navigation-menu" class="clearfix"> {%- for item in header.tabs -%} {%- if item.tabRenderer -%} {% set item = item.tabRenderer %} <li class=""> <a href="{{ item.endpoint.commandMetadata.webCommandMetadata.url }}" class="yt-uix-button spf-link {{ item.status == 2 ? "selected" : item.status == 1 ? "partially-selected" }} yt-uix-sessionlink yt-uix-button-epic-nav-item yt-uix-button-size-default" data-sessionlink="ei=PYD4WYi3NtLY-AOXuqv4Aw&amp;ved=CC8Qwy0iEwjIycGWgZvXAhVSLH4KHRfdCj8omxw"><span class="yt-uix-button-content">{{ item.title }}</span></a> </li> {% elseif item.expandableTabRenderer %} {% set item = item.expandableTabRenderer %} <li class=""> <div id="channel-search" class="{{ item.selected ? "expanded" }}"> <button class="show-search epic-nav-item secondary-nav" title="{{ item.title }}"> <span class="epic-nav-item-heading-icon search-icon yt-sprite"></span> </button> <form class="search-form epic-nav-item secondary-nav" action="{{ rehike.getUrl(item.endpoint) }}" method="get"> <span class=" yt-uix-form-input-container yt-uix-form-input-text-container"> <input class="yt-uix-form-input-text search-field" name="query" id="channels-search-field" type="text" value="{{ item.expandedText }}" placeholder="{{ item.title }}" maxlength="100" autocomplete="off"> </span> </form> </div> </li> {% endif %} {% endfor %} </ul> </div> </div> {% endmacro %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{% macro render(data) %} <div class="branded-page-related-channels branded-page-box yt-card"> <h2 class="branded-page-module-title"> {{ rehike.getText(data.title) }} </h2> <ul class="branded-page-related-channels-list"> {% for item in data.items %} {{ _self.channel_item(item) }} {% endfor %} </ul> {%- if data.seeMoreButton -%} {{ _self.see_more(data.seeMoreButton) }} {%- endif -%} </div> {% endmacro %} {% macro channel_item(data) %} {% from "common/uix/subscription_button.twig" import render as subscription_button %} {% import "common/uix/lockup.twig" as lockup %} <li class="branded-page-related-channels-item spf-link clearfix" data-external-id="{{ data.channelId }}"> <span class="yt-lockup clearfix yt-lockup-channel yt-lockup-mini"> {# Lol the style attribute was in YouTube's original source code #} <div class="yt-lockup-thumbnail" style="width: 34px;"> <a href="{{ rehike.getUrl(data) }}" class="ux-thumb-wrap spf-link " aria-hidden="true"> <span class="video-thumb yt-thumb yt-thumb-34 g-hovercard" data-ytid="{{ data.channelId }}"> <span class="yt-thumb-square"> <span class="yt-thumb-clip"> <img alt="" onload=";window.__ytRIL &amp;&amp; __ytRIL(this)" aria-hidden="true" src="{{ rehike.getThumb(data.thumbnail, 34) }}" data-ytimg="1" width="34" height="34"> <span class="vertical-align"></span> </span> </span> </span> </a> </div> <div class="yt-lockup-content"> {{ lockup.title(data, "channel", false, "yt-uix-tile-link") }} <div class="yt-lockup-meta spf-nolink"> {{ subscription_button(data.subscribeButton) }} </div> </div> </span> </li> {% endmacro %} {% macro see_more(data) %} <p class="branded-page-related-channels-see-more"> <a href="{{ data.href }}"> {{ data.title }} </a> </p> {% endmacro %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
<link itemprop="url" href="https://www.youtube.com/watch?v={{ yt.videoId }}"> <meta itemprop="name" content="{{ rehike.getText(info.title) }}"> <meta itemprop="description" content="Rick Astley - Never Gonna Give You Up (Official Music Video) - Listen On Spotify: http://smarturl.it/AstleySpotify Download Rick&#39;s Number 1 album &quot;&quot;50&quot;&quot; - ht..."> <meta itemprop="paid" content="False"> <meta itemprop="channelId" content="UC38IQsAvIsxxjztdMZQtwHA"> <meta itemprop="videoId" content="{{ yt.videoId }}"> <meta itemprop="duration" content="PT3M33S"> <meta itemprop="unlisted" content="False"> <span itemprop="author" itemscope itemtype="http://schema.org/Person"> <link itemprop="url" href="{{ owner.navigationEndpoint.browseEndpoint.canonicalBaseUrl }}"> </span> <span itemprop="author" itemscope itemtype="http://schema.org/Person"> <link itemprop="url" href="https://plus.google.com/118341150529602077100"> </span> <script type="application/ld+json" > { "@context": "http://schema.org", "@type": "BreadcrumbList", "itemListElement": [ { "@type": "ListItem", "position": 1, "item": { "@id": "{{ owner.navigationEndpoint.browseEndpoint.canonicalBaseUrl|json_encode() }}", "name": "RickAstleyVEVO" } } ] } </script> <link itemprop="thumbnailUrl" href="https://i.ytimg.com/vi/{{ yt.videoId }}/maxresdefault.jpg"> <span itemprop="thumbnail" itemscope itemtype="http://schema.org/ImageObject"> <link itemprop="url" href="https://i.ytimg.com/vi/{{ yt.videoId }}/maxresdefault.jpg"> <meta itemprop="width" content="1280"> <meta itemprop="height" content="720"> </span> <link itemprop="embedURL" href="https://www.youtube.com/embed/{{ yt.videoId }}"> <meta itemprop="playerType" content="HTML5 Flash"> <meta itemprop="width" content="1280"> <meta itemprop="height" content="720"> <meta itemprop="isFamilyFriendly" content="True"> <meta itemprop="regionsAllowed" content="AD,AE,AF,AG,AI,AL,AM,AO,AQ,AR,AS,AT,AU,AW,AX,AZ,BA,BB,BD,BE,BF,BG,BH,BI,BJ,BL,BM,BN,BO,BR,BS,BT,BV,BW,BY,BZ,CA,CC,CD,CF,CG,CH,CI,CK,CL,CM,CN,CO,CR,CU,CV,CX,CY,DJ,DK,DM,DO,DZ,EC,EE,EG,EH,ER,ES,ET,FI,FJ,FK,FM,FO,FR,GA,GB,GD,GE,GF,GG,GH,GI,GL,GM,GN,GP,GQ,GR,GS,GT,GU,GW,GY,HK,HM,HN,HR,HT,HU,ID,IE,IL,IM,IN,IO,IQ,IR,IS,IT,JE,JM,JO,JP,KE,KG,KH,KI,KM,KN,KP,KR,KW,KY,KZ,LA,LB,LC,LI,LK,LR,LS,LT,LU,LV,LY,MA,MC,MD,ME,MF,MG,MH,MK,ML,MM,MN,MO,MP,MQ,MR,MS,MT,MU,MV,MW,MX,MY,MZ,NA,NC,NE,NF,NG,NI,NL,NO,NP,NR,NU,NZ,OM,PA,PE,PF,PG,PH,PK,PL,PM,PN,PR,PS,PT,PW,PY,QA,RE,RO,RS,RU,RW,SA,SB,SC,SD,SE,SG,SH,SI,SJ,SL,SM,SN,SO,SR,ST,SV,SY,SZ,TC,TD,TF,TG,TH,TJ,TK,TL,TM,TN,TO,TR,TT,TV,TW,TZ,UA,UG,UM,US,UY,UZ,VA,VC,VE,VG,VI,VN,VU,WF,WS,YE,YT,ZA,ZM,ZW"> <meta itemprop="interactionCount" content="432071848"> <meta itemprop="datePublished" content="2009-10-24"> <meta itemprop="genre" content="Music">
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{% import '/common/watch/watch7/action_panel/base.twig' as action_panel %} <div id="watch-discussion" class="branded-page-box yt-card"> {{ action_panel.loading() }} </div>
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{## # Watch playlists master builder # # This is only used if yt.page.playlist is set, which should # only be the case on the watch page, and of course, only # if a playlist renderer is present. Due to the player structure, # this is separate from the rest of the watch page. # # @author Nightlinbit (Daylin Cooper) # @version 1.0 # @license CC0 #} {% include '/common/watch/watch8/playlist/appbar_playlist.twig' %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{% macro watch_discussion_disabled(message) %} <div id="watch-discussion" class="branded-page-box yt-card"> <div id="comment-section-renderer" class="comment-section-renderer" data-child-tracking="" > <div class="comment-section-renderer-items" id="comment-section-renderer-items"> <span class="yt-spinner-img comment-section-items-loading yt-sprite" title="Loading icon"></span> <div class="display-message"> {%- for run in message.runs -%} {%- if run.navigationEndpoint -%} {%- set href = run.navigationEndpoint.commandMetadata.webCommandMetadata.url -%} {%- set spf = (href|first == "/") -%} <a href="{{ href }}" class="{{ spf ? 'spf-link' }}" target="_blank">{{ run.text }}</a> {%- else -%} {{ run.text }} {%- endif -%} {%- endfor -%} </div> </div> <div class="feedback-banner hid" aria-live="polite"></div> <span class="yt-spinner-img comment-renderer-loading yt-sprite" title="Loading icon"></span> <div class="hid" id="comment-renderer-abuse"> <div class="comment-renderer-abuse-content"></div> </div> </div> </div> {% endmacro %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{## # Fragments (version 2) / Comments # # This new version relies on SPF.js for loading fragments. However, # element wrappers do not have to be complete. This only renders partial # HTML to update the page. #} <body> <div id="masthead_search" data-is-crosswalk="0"></div> <div id="watch-discussion"> {% from "/common/comments/comment_section_renderer.twig" import render as comment_section_renderer %} {{ comment_section_renderer(yt.commentsRenderer)}} </div> </body>
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
<div id="watch7-user-header" class=" spf-link "> <a href="{{ owner.navigationEndpoint.browseEndpoint.canonicalBaseUrl }}" class="yt-user-photo spf-link "> <span class="video-thumb yt-thumb yt-thumb-48"> <span class="yt-thumb-square"> <span class="yt-thumb-clip"> <img data-ytimg="1" width="48" height="48" data-thumb="{{ owner.thumbnail.thumbnails.0.url }}" alt="{{ rehike.getText(owner.title) }}" src="{{ PIXEL }}" onload=";window.__ytRIL &amp;&amp; __ytRIL(this)"> <span class="vertical-align"></span> </span> </span> </span> </a> <div class="yt-user-info"> <a href="{{ owner.navigationEndpoint.browseEndpoint.canonicalBaseUrl }}" class=" spf-link ">{{ rehike.getText(owner.title) }}</a> {% if owner.badges %} <span data-tooltip-text="{{ yt.msgs.verified }}" class="yt-channel-title-icon-verified yt-uix-tooltip yt-sprite" aria-label="{{ yt.msgs.verified }}"></span> {% endif %} </div> <span id="watch7-subscription-container"> {%- if owner.subscriptionButtonRenderer -%} {% import 'common/uix/subscription_button.twig' as subscription_button %} {{ subscription_button.render(owner.subscriptionButtonRenderer) }} {%- elseif owner.channelSettingsButtonRenderer -%} {% from "common/uix/button.twig" import render as button %} {{ button(owner.channelSettingsButtonRenderer) }} {%- endif -%} </span> </div>
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{% from "common/uix/button.twig" import render as button %} <div id="watch7-creator-bar" class="clearfix yt-uix-button-panel yt-card yt-card-has-padding"> <ul id="watch7-creator-bar-nav-buttons"> {% for item in creator_bar.navButtons %} <li class="creator-bar-item"> {{ button(item) }} </li> {% endfor %} </ul> <ul id="watch7-creator-bar-edit-buttons"> {% for item in creator_bar.editButtons %} <li class="creator-bar-item yt-uix-tooltip yt-uix-tooltip-reverse" title="{{ item.itemTooltip }}" data-tooltip-text="{{ item.itemTooltip }}"> {{ button(item) }} </li> {% endfor %} </ul> </div>
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{% import '/common/watch/watch7/sidebar/macros.twig' as sidebar %} <div id="watch7-sidebar" class="watch-sidebar"> <div id="placeholder-playlist" class="watch-playlist player-height {{ not yt.page.playlist ? ' hid' }}"></div> {%- if yt.page.liveChat -%} {% from "common/watch/live_chat/base.twig" import render as live_chat %} {{ live_chat(yt.page.liveChat) }} {%- endif -%} <div id="watch7-sidebar-contents" class="watch-sidebar-gutter yt-card yt-card-has-padding yt-uix-expander yt-uix-expander-collapsed"> <div id="watch7-sidebar-modules"> {% if secondaryResults.compactAutoplayRenderer %} <div class="watch-sidebar-section"> {% include '/common/watch/watch7/sidebar/autoplay_module.twig' %} </div> {% endif %} <div class="watch-sidebar-section"> {{ secondaryResults.compactAutoplayRenderer ? '<hr class="watch-sidebar-separation-line">'|raw }} <div class="watch-sidebar-body"> {{ sidebar.video_list(secondaryResults.results, 'watch-related', yt.continuation) }} </div> </div> </div> </div> </div>
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{% import '/common/watch/watch7/sidebar/macros.twig' as sidebar %} {% set autoplay = secondaryResults.compactAutoplayRenderer %} <div class="autoplay-bar"> <div class="checkbox-on-off"> <label for="autoplay-checkbox">{{ autoplay.toggleDesc }}</label> <span class="autoplay-hovercard yt-uix-hovercard"> <span class="autoplay-info-icon yt-uix-button-opacity yt-uix-hovercard-target yt-sprite" data-orientation="vertical" data-position="topright"></span> <span class="yt-uix-hovercard-content"> {{ autoplay.infoText }} </span> </span> <span class="yt-uix-checkbox-on-off "> <input id="autoplay-checkbox" class="" type="checkbox" name="" {{ autoplay.checked ? 'checked=""' }}> <label for="autoplay-checkbox" id="autoplay-checkbox-label"> <span class="checked"></span><span class="toggle"></span><span class="unchecked"></span> </label> </span> </div> <h4 class="watch-sidebar-head"> {{ autoplay.title }} </h4> <div class="watch-sidebar-body"> {{ sidebar.video_list(autoplay.contents) }} </div> </div>
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{% macro video_list(data, id) %} <ul {{ id ? ('id="' ~ id ~ '"')|raw }} class="video-list"> {% for item in data %} {{ _self.video_item(item) }} {% endfor %} </ul> {% endmacro %} {% macro video_item(renderer) %} {% if renderer.continuationItemRenderer %} {% set continuation = renderer.continuationItemRenderer.continuationEndpoint.continuationCommand.token %} <div id="watch-more-related" class="hid"> <li id="watch-more-related-loading">{{ yt.msgs.loadingMoreSuggestions }}</li> </div> <button id="watch-more-related-button" class="yt-uix-button yt-uix-button-size-default yt-uix-button-expander" onclick=";return false;" data-continuation="{{ continuation }}" data-button-action="yt.www.watch.related.loadMore"> <span class="yt-uix-button-content">{{ yt.msgs.showMore }}</span> </button> {% else %} {% set data = getLockupInfo(renderer) %} {% set info = data.info %} {% set a11yId = generateRid() %} {% import "common/thumbnail_overlays.twig" as overlays %} {% from "core/html/img.twig" import img %} {% from "common/uix/badge_list.twig" import render as badge_list %} <li class="video-list-item related-list-item related-list-item-compact-{{ data.type }}"> {# playlist html structure is entirely different #} {% if data != null %} {% if data.type == "playlist" or data.type == "radio" %} <a href="{{ rehike.getUrl(info) }}" class="related-playlist yt-pl-thumb-link spf-link {{ data.type == "radio" ? "mix-playlist" }} resumable-list"> <span class="yt-pl-thumb {{ data.type == "radio" ? "yt-mix-thumb" }}"> <span class="video-thumb yt-thumb yt-thumb-168"> <span class="yt-thumb-clip"> {{ img({ src: rehike.getThumb(data.thumbArray, 94), width: 168, height: 94, ytImg: 1, delayLoad: true, onload: ";window.__ytRIL && __ytRIL(this)", }) }} <span class="vertical-align"></span> </span> </span> {{ overlays.playlist(data) }} </span> <span class="title" dir="ltr" title="{{ rehike.getText(info.title) }}"> {{ rehike.getText(info.title) }} </span> {% set author = getByline(info) %} {% if author != null %} <span class="stat attribution"> {% if rehike.config.appearance.usernamePrepends %} <span>by </span> {% endif %} <span>{{ rehike.getText(author) }}</span> </span> {% endif %} </a> {% else %} <div class="content-wrapper"> <a href="{{ rehike.getUrl(info) }}" class="content-link spf-link" title="{{ rehike.getText(info.title) }}"> <span dir="ltr" class="title" aria-describedby="description-id-{{ a11yId }}"> {{ rehike.getText(info.title) }} </span> {% set videoTime = getVideoTime(info) %} {% if videoTime != null %} <span id="description-id-{{ a11yId }}" class="accessible-description">{{ yt.msgs.durationA11y|format(videoTime) }}</span> {# TODO: i18n #} {% endif %} {% set author = getByline(info) %} {% if author != null %} <span class="stat attribution"> {% if rehike.config.appearance.usernamePrepends %} <span>by </span> {% endif %} <span>{{ rehike.getText(author) }}</span> {% if rehike.config.appearance.watchSidebarVerification and info.ownerBadges %} <span title="{{ yt.msgs.verified }}" class="yt-uix-tooltip yt-channel-title-icon-verified yt-sprite"></span> {% endif %} </span> {% endif %} {% if info.viewCountText %} <span class="stat"> <span class="view-count">{{ rehike.getText(info.viewCountText) }}</span> {%- if rehike.config.appearance.watchSidebarDates and info.publishedTimeText -%} <span class="published-time">{{ rehike.getText(info.publishedTimeText) }}</span> {%- endif -%} </span> {% endif %} {% if info.badges %} {{ badge_list(info.badges) }} {% endif %} </a> </div> <div class="thumb-wrapper"> <a href="{{ rehike.getUrl(info) }}" class="thumb-link spf-link"> <span class="yt-uix-simple-thumb-wrap yt-uix-simple-thumb-related {{ data.type == "video" and rehike.config.appearance.movingThumbnails ? "yt-uix-mouseover-img-wrap" }}"> {{ img({ src: rehike.getThumb(data.thumbArray, 94), width: 168, height: 94, ytImg: 1, delayLoad: true, onload: ";window.__ytRIL && __ytRIL(this)", customAttributes: { "data-mouseover-src": rehike.getThumb(info.richThumbnail.movingThumbnailRenderer.movingThumbnailDetails) } }) }} {{ overlays.time(info.thumbnailOverlays) }} </span> </a> {{ overlays.render(info.thumbnailOverlays, info.videoId, false) }} </div> {% endif %} </li> {% endif %} {% endif %} {% endmacro %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{% macro loading() %} {% import '/core/spinner.twig' as spinner %} <div class="action-panel-loading"> {{ spinner.render(yt.msgs.loading) }} </div> {% endmacro %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{% import '/common/watch/watch7/action_panel/base.twig' as action_panel %} <div id="action-panel-stats" class="action-panel-content hid"> {{ action_panel.loading() }} </div>
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{% macro description(data) %} {%- for snippet in data.runs -%} {%- if (snippet.navigationEndpoint) -%} {%- set href = rehike.getUrl(snippet) -%} {%- set spf = (href|first == "/") -%} {% if snippet.navigationEndpoint.watchEndpoint and snippet.navigationEndpoint.watchEndpoint.videoId == yt.videoId %} <a href="#" onclick="yt.www.watch.player.seekTo({{ snippet.navigationEndpoint.watchEndpoint.startTimeSeconds }});return false;"> {% else %} <a href="{{ href }}" class=" {{ spf ? 'spf-link' }} " target="_blank"> {% endif %} {%- endif -%} {{ snippet.text|nl2br }} {%- if (snippet.navigationEndpoint) -%} </a> {%- endif -%} {% endfor %} {% endmacro %} {% set shouldCollapse = not secondaryInfo.description.runs is empty and not secondaryInfo.defaultExpanded %} <div id="action-panel-details" class="action-panel-content yt-uix-expander yt-card yt-card-has-padding {{ shouldCollapse ? "yt-uix-expander-collapsed" }}"> <div id="watch-description" class="yt-uix-button-panel"> <div id="watch-description-content"> <div id="watch-description-clip"> {% if secondaryInfo.dateText %} <div id="watch-uploader-info"><strong class="watch-time-text">{{ secondaryInfo.dateText }}</strong></div> {% endif %} <div id="watch-description-text" class=""> <p id="eow-description" class=""> {{ _self.description(secondaryInfo.description) }} </p> </div> <div id="watch-description-extras"> <ul class="watch-extras-section"> {% for item in secondaryInfo.metadataRowContainer.items %} {%- if item.metadataRowRenderer -%} {% set item = item.metadataRowRenderer %} <li class="watch-meta-item yt-uix-expander-body"> <h4 class="title">{{ rehike.getText(item.title) }}</h4> <ul class="content watch-info-tag-list"> {% for content in item.contents %} <li> {% if content.runs %} {% for run in content.runs %} {% if run.navigationEndpoint %} {% set href = rehike.getUrl(run) %} <a{{ (href|first == "/") ? " class=\"spf-link\"" }} href="{{ href }}"> {% endif %} {{ run.text }} {% if run.navigationEndpoint %} </a> {% endif %} {% endfor %} {% elseif content.simpleText %} {% if content.navigationEndpoint %} {% set href = rehike.getUrl(simpleText) %} <a{{ (href|first == "/") ? " class=\"spf-link\"" }} href="{{ href }}"> {% endif %} {{ content.simpleText }} {% if content.navigationEndpoint %} </a> {% endif %} {% endif %} </li> {% endfor %} </ul> </li> {%- elseif item.richMetadataRowRenderer -%} {% set item = item.richMetadataRowRenderer %} <li class="watch-meta-item has-image"> {% set url = rehike.getUrl(item) %} {% set attr = (href|first == "/") ? 'class="spf-link"' : 'target="_blank"' %} <h4 class="title">{{ rehike.getText(item.label) }}</h4> <span class="metadata-row-image"> <a href="{{ url }}" data-url="{{ url }}" {{ attr }}> <img src="{{ getThumb(item.thumbnail, 55) }}"> </a> </span> <ul class="content watch-info-tag-list"> <li> <a href="{{ url }}" data-url="{{ url }}" {{ attr }}> {{ rehike.getText(item.title) }} </a> </li> {% if item.subtitle %} <li> {{ rehike.getText(item.subtitle) }} </li> {% endif %} {% if item.callToAction %} <li> <a href="{{ url }}" data-url="{{ url }}" {{ attr }}> {{ rehike.getText(item.callToAction) }} </a> </li> {% endif %} </ul> </li> {%- endif -%} {% endfor %} </ul> </div> </div> </div> </div> {% if shouldCollapse or not secondaryInfo.description.runs is empty %} <button class="yt-uix-button yt-uix-button-size-default yt-uix-button-expander yt-uix-expander-head yt-uix-expander-collapsed-body yt-uix-gen204" type="button" onclick=";return false;" data-gen204="feature=watch-show-more-metadata"><span class="yt-uix-button-content">{{ yt.msgs.showMore }}</span></button> <button class="yt-uix-button yt-uix-button-size-default yt-uix-button-expander yt-uix-expander-head yt-uix-expander-body" type="button" onclick=";return false;"><span class="yt-uix-button-content">{{ yt.msgs.showLess }}</span></button> {% endif %} </div>
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{% import '/common/watch/watch7/action_panel/base.twig' as action_panel %} <div id="action-panel-report" class="action-panel-content hid" data-auth-required="true"> {{ action_panel.loading() }} </div>
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{% from "common/watch/watch7/action_panel/base.twig" import loading %} <div id="action-panel-transcript" class="action-panel-content hid"> <div id="watch-actions-transcript-loading"> {{ loading() }} </div> <div id="watch-actions-transcript" class="hid"> <h2 class="yt-card-title">{{ yt.msgs.transcriptTitle }}</h2> <div id="caption-line-template" class="hid"> <!-- <div class="caption-line-time"> <div class="caption-line-start">__start__</div> </div> <div class="editable-line-text"> <span class="editable-line-text-original">__original__</span> <label class="editable-line-text-current hid">__current__</label> <textarea class="editable-line-text-input hid">__input__</textarea> </div> --> </div> <div id="watch-transcript-container" class="yt-scrollbar"> <div id="watch-transcript-not-found" class="hid"> {{ yt.msgs.transcriptFail }} </div> </div> </div> </div>
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
<div id="action-panel-rental-required" class="action-panel-content hid"> <div id="watch-actions-rental-required"> <strong>Rating is available when the video has been rented.</strong> </div> </div>
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{% import '/common/watch/watch7/action_panel/base.twig' as action_panel %} <div id="action-panel-share" class="action-panel-content hid"> <div id="watch-actions-share-loading"> {{ action_panel.loading() }} </div> <div id="watch-actions-share-panel"></div> </div>
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
<div id="action-panel-error" class="action-panel-content hid"> <div class="action-panel-error"> This feature is not available right now. Please try again later. </div> </div>
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
<div id="watch8-action-buttons" class="watch-action-buttons clearfix"> <div id="watch8-secondary-actions" class="watch-secondary-actions yt-uix-button-group" data-button-toggle-group="optional"> {% from "/common/uix/button.twig" import render as button %} {%- for actionButton in info.actionButtons -%} {{ button(actionButton) }} {%- endfor -%} </div> <div id="watch8-sentiment-actions"> <div id="watch7-views-info"> {% if info.viewCount %} <div class="watch-view-count{{ yt.page.isLive ? " metadata-updateable-viewership" }}">{{ info.viewCount }}</div> {% endif %} {% if info.likeButtonRenderer.sparkbars %} <div class="video-extras-sparkbars"> <div class="video-extras-sparkbar-likes" style="width: {{ info.likeButtonRenderer.sparkbars.likePercent }}%"></div> <div class="video-extras-sparkbar-dislikes" style="width: {{ info.likeButtonRenderer.sparkbars.dislikePercent }}%"></div> </div> {% endif %} </div> {% set likeButton = info.sentimentActions.likeButton %} {% set dislikeButton = info.sentimentActions.dislikeButton %} {# TODO: refined clickcards #} <span class="like-button-renderer {{ yt.signin.isSignedIn ? "actionable" }}" data-button-toggle-group="optional" {{ yt.signin.isSignedIn ? "data-logged-in=\"1\"" }}> {# This isn't iterable oops #} {%- if yt.signin.isSignedIn -%} <span> {%- endif -%} {{ button(info.likeButtonRenderer.likeButton) }} {%- if yt.signin.isSignedIn -%} </span> <span> {%- endif -%} {{ button(info.likeButtonRenderer.activeLikeButton) }} {%- if yt.signin.isSignedIn -%} </span> <span> {%- endif -%} {{ button(info.likeButtonRenderer.dislikeButton) }} {%- if yt.signin.isSignedIn -%} </span> <span> {%- endif -%} {{ button(info.likeButtonRenderer.activeDislikeButton) }} {%- if yt.signin.isSignedIn -%} </span> {%- endif -%} </span> </div> </div>
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
<div id="watch-header" class="yt-card yt-card-has-padding"> <div id="watch7-headline" class="clearfix"> {% if info.hashtags or info.superTitle %} <span class="standalone-collection-badge-renderer-text"> {% if info.superTitle %} {% for link in info.superTitle.items %} <a class="spf-link" href="{{ link.url }}">{{ link.text }}</a> {% endfor %} {% endif %} {% if info.hashtags %} {% for hashtag in info.hashtags %} <a href="/results?search_query={{ hashtag }}">#{{ hashtag }}</a> {% endfor %} {% endif %} </span> {% endif %} <div id="watch-headline-title"> <h1 class="watch-title-container"> {# {% if info.badges[0].metadataBadgeRenderer.icon.iconType == "PRIVACY_UNLISTED" %} <span id="watch-privacy-icon" class="yt-uix-tooltip yt-uix-tooltip-reverse unlisted" title="This video is unlisted. Only those with the link can see it." tabindex="0" data-tooltip-text="This video is unlisted. Only those with the link can see it." aria-labelledby="yt-uix-tooltip41-arialabel"> <span class="privacy-icon yt-sprite"></span> </span> {% endif %} #} {% if info.privacyBadge %} <span id="watch-privacy-icon" class="yt-uix-tooltip yt-uix-tooltip-reverse {{ info.privacyBadge.privacy }}" title="{{ info.privacyBadge.tooltip }}" tabindex="0"> <span class="privacy-icon yt-sprite"></span> </span> {% endif %} {# apply spaceless doesn't work here for no fucking reason so i had to purge the formatting, sorry #} <span id="eow-title" class="watch-title" dir="ltr" title="{{ rehike.getText(info.title) }}">{% for run in info.title.runs %}{% if run.navigationEndpoint %}<a {{ rehike.getUrl(run)|first == "/" ? 'class="spf-link" ' }}href="{{ rehike.getUrl(run) }}">{% endif %}{{ run.text }}{% if run.navigationEndpoint %}</a>{% endif %}{% endfor %}</span> </h1> </div> </div> {% include '/common/watch/watch7/user_header.twig' %} {% include '/common/watch/watch8/action_buttons.twig' %} </div> {% include '/common/watch/watch8/action_panels_module.twig' %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
<div id="watch-action-panels" class="watch-action-panels yt-uix-button-panel hid yt-card yt-card-has-padding"> {% include '/common/watch/watch7/action_panel/share.twig' %} {% include '/common/watch/watch7/action_panel/transcript.twig' %} {% include '/common/watch/watch7/action_panel/stats.twig' %} {% include '/common/watch/watch7/action_panel/report.twig' %} {% include '/common/watch/watch7/action_panel/rental_required.twig' %} {% include '/common/watch/watch7/action_panel/error.twig' %} <button class="yt-uix-button yt-uix-button-size-default yt-uix-button-default yt-uix-button-empty yt-uix-button-has-icon no-icon-markup yt-uix-button-opacity yt-uix-close" type="button" onclick=";return false;" id="action-panel-dismiss" aria-label="Close" data-close-parent-id="watch8-action-panels"></button> </div>
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{## # Appbar playlist builder # # This builds the watch8/appbar player playlist. # # @author Nightlinbit (Daylin Cooper) # @version 1.0 # @license CC0 #} {% import '/common/watch/watch8/playlist/macros.twig' as macros %} {% set playlist = yt.page.playlist %} <div id="watch-appbar-playlist" class="watch-playlist player-height"> <div class="main-content"> {% include '/common/watch/watch8/playlist/playlist_header.twig' %} <div class="playlist-videos-container yt-scrollbar-dark yt-scrollbar"> {{ macros.list(playlist.contents) }} <script>try {var r = document.getElementById('playlist-autoscroll-list');r.scrollTop = r.querySelector('.currently-playing').offsetTop;} catch (e) {}</script> </div> </div> </div>
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{% from "common/uix/button.twig" import render as button %} {% set playlist = yt.page.playlist %} <div class="playlist-header"> <div class="playlist-header-content" data-loop-auto-clicktracking="CBYQ0TkiEwiZ0smi4d7ZAhU4H34KHf9DCpwo-B0yCGF1dG9wbGF5SMynl6LS1_rxtgE" data-normal-auto-clicktracking="CBYQ0TkiEwiZ0smi4d7ZAhU4H34KHf9DCpwo-B0yCGF1dG9wbGF5SMynl6LS1_rxtgE" data-list-author="" data-shareable="True" data-list-title="{{ playlist.title }}" data-loop_shuffle-auto-clicktracking="CBYQ0TkiEwiZ0smi4d7ZAhU4H34KHf9DCpwo-B0yCGF1dG9wbGF5SMynl6LS1_rxtgE" data-full-list-id="{{ playlist.playlistId }}" data-shuffle-auto-clicktracking="CBYQ0TkiEwiZ0smi4d7ZAhU4H34KHf9DCpwo-B0yCGF1dG9wbGF5SMynl6LS1_rxtgE" data-initial-loop-state="false"> <div class="appbar-playlist-controls clearfix"> {# <span class="yt-uix-clickcard"> <span class="yt-uix-clickcard-target" data-position="bottomright" data-orientation="vertical"> <button class="yt-uix-button yt-uix-button-size-default yt-uix-button-player-controls yt-uix-button-empty yt-uix-button-has-icon no-icon-markup yt-uix-playlistlike watch-playlist-like yt-uix-button-opacity yt-uix-tooltip" type="button" onclick=";return false;" id="gh-playlist-save" aria-label="Save to Playlists" title="Save to Playlists" data-like-label="" data-playlist-id="{{ playlist.playlistId }}" data-unlike-label="" data-unlike-tooltip="Remove" data-like-tooltip="Save to Playlists" data-toggle-class="yt-uix-button-toggled" data-token="QUFFLUhqbVVlR1ZYZUVPZ1E0dnZ2U3lObzI3U3R1ajRId3xBQ3Jtc0tsMDhmX1JMZlh0dzB2MFBRQ2lEZy1DdlVtWFdxLXA3N0l3SUpYYUZ0blRpckVZaWMtbTlScXE4T2RHaG1mYWd2SnRtQWg0eXJfUC1fZFNvazNaY3ZOZ053TjZIZDBhNi14ZDhNS29FY1dCOERxX0gxWUh5aHpreUZZOVhjMU5BRllpY1N6SktLNk9vYzJZZXJ0dUpkSUc1TW8xZkE="></button> </span> <div class="signin-clickcard yt-uix-clickcard-content"> <h3 class="signin-clickcard-header">Sign in to YouTube</h3> <div class="signin-clickcard-message"> </div> <a href="https://accounts.google.com/ServiceLogin?passive=true&amp;uilel=3&amp;hl=en&amp;continue=https%3A%2F%2Fwww.youtube.com%2Fsignin%3Fnext%3D%252Fwatch%253Fv%253DtuPqvSRF08w%2526list%253DFLNaqshw8BAQ12nPRixBy4AA%26action_handle_signin%3Dtrue%26hl%3Den%26app%3Ddesktop%26feature%3D__FEATURE__&amp;service=youtube" class="yt-uix-button signin-button yt-uix-button-primary yt-uix-button-size-default"><span class="yt-uix-button-content">Sign in</span></a> </div> </span> #} {{ button(playlist.saveButton) }} </div> <div class="playlist-info"> {% if playlist.isMix %} <span class="playlist-mix-icon yt-sprite"></span> {% endif %} <h3 class="playlist-title"> <a href="/playlist?list={{ playlist.playlistId }}" class="spf-link">{{ playlist.title }}</a> </h3> <ul class="playlist-details"> {% if playlist.shortBylineText %} {% if playlist.shortBylineText.runs.0 %} {% set author = playlist.shortBylineText.runs.0 %} <li class="author-attribution"> {{ rehike.config.appearance.usernamePrepends ? yt.msgs.usernamePrepend }}<a href="{{ rehike.getUrl(author) }}" class="spf-link">{{ author.text }}</a> </li> {% else %} <li class="author-attribution"> {{ rehike.config.appearance.usernamePrepends ? yt.msgs.usernamePrepend }}{{ playlist.shortBylineText.simpleText }} </li> {% endif %} {% endif %} {% if playlist.videoCountText %} <li class="playlist-progress"> <span id="playlist-current-index">{{ playlist.videoCountText.currentIndex }}</span><span id="playlist-length">{{ playlist.videoCountText.videoCount }}</span> </li> {% endif %} </ul> </div> </div> <div class="control-bar clearfix"> <div class="playlist-nav-controls"> <button class="yt-uix-button yt-uix-button-size-default yt-uix-button-player-controls yt-uix-button-empty yt-uix-button-has-icon toggle-loop yt-uix-button-opacity yt-uix-tooltip yt-uix-tooltip" type="button" onclick=";return false;" title="Repeat playlist" data-button-toggle="true"><span class="yt-uix-button-icon-wrapper"><span class="yt-uix-button-icon yt-uix-button-icon-watch-appbar-autoplay yt-sprite"></span></span></button> <button class="yt-uix-button yt-uix-button-size-default yt-uix-button-player-controls yt-uix-button-empty yt-uix-button-has-icon shuffle-playlist yt-uix-button-opacity yt-uix-tooltip yt-uix-tooltip" type="button" onclick=";return false;" title="Shuffle" data-button-toggle="true"><span class="yt-uix-button-icon-wrapper"><span class="yt-uix-button-icon yt-uix-button-icon-watch-appbar-shuffle-video-list yt-sprite"></span></span></button> </div> <div class="playlist-behavior-controls"> {% for control in playlist.behaviorControls %} {{ button(control) }} {% endfor %} </div> </div> </div>
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{%- macro item(data, iteration) -%} {% set href = data.navigationEndpoint.commandMetadata.webCommandMetadata.url %} {% set title = rehike.getText(data.title) %} {% set byline = rehike.getText(data.longBylineText) %} {% set thumbnail = data.thumbnail.thumbnails.0.url %} <li class="yt-uix-scroller-scroll-unit {{ data.selected ? ' currently-playing' }}" data-video-id="{{ data.videoId }}" data-innertube-clicktracking="{{ data.trackingParams }}" data-index="{{ iteration - 1 }}" data-thumbnail-url="{{ thumbnail }}" data-video-username="{{ byline }}" data-video-title="{{ title }}"> <span class="index"> {{ data.indexText ? rehike.getText(data.indexText) : "&nbsp;"|raw }} </span> <a href="{{ href }}" class=" spf-link playlist-video clearfix spf-link "> <span class="video-thumb yt-thumb yt-thumb-72"> <span class="yt-thumb-default"> <span class="yt-thumb-clip"> <img onload=";window.__ytRIL &amp;&amp; __ytRIL(this)" data-thumb="{{ thumbnail }}" alt="" aria-hidden="true" width="72" data-ytimg="1" src="{{ PIXEL }}"> <span class="vertical-align"></span> </span> </span> </span> <div class="playlist-video-description"> <h4 class="yt-ui-ellipsis yt-ui-ellipsis-2"> {{ title }} </h4> <span class="video-uploader-byline"> <span class="">{{ rehike.config.byTextOnByline ? yt.msgs.usernamePrepend }}{{ byline }}</span> </span> </div> </a> </li> {%- endmacro -%} {%- macro list(contents) -%} <ol id="playlist-autoscroll-list" class="playlist-videos-list yt-uix-scroller yt-viewport" data-scroll-action="yt.www.watch.lists.loadThumbnails"> {%- for video in contents -%} {% if video.playlistPanelVideoRenderer %} {{ _self.item(video.playlistPanelVideoRenderer, loop.index) }} {% endif %} {%- endfor -%} </ol> {%- endmacro -%}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{% macro render(data) %} {% set collapsed = data.initialDisplayState == "LIVE_CHAT_DISPLAY_STATE_COLLAPSED" %} <div id="watch-sidebar-live-chat" class=" yt-card yt-card-has-padding yt-uix-expander "> <div class="yt-uix-expander live-chat-expander {{ collapsed ? "yt-uix-expander-collapsed" }}"> {% set url = data.isReplay ? "/live_chat_replay" : "/live_chat" %} {% set url = url ~ "?continuation=" ~ data.continuations[0].reloadContinuationData.continuation %} <iframe id="live-chat-iframe" class="live-chat-iframe yt-uix-expander-body" src="{{ url }}" data-host-origin="https://www.youtube.com/"></iframe> <div id="hide-live-comments"> {% set btn = data.showHideButton.toggleButtonRenderer %} <button class="yt-uix-button yt-uix-button-size-default yt-uix-button-expander yt-uix-expander-head yt-uix-expander-body" type="button" onclick=";return false;" id="hide-live-chat-button"> <span class="yt-uix-button-content"> {{ collapsed ? rehike.getText(btn.toggledText) : rehike.getText(btn.defaultText) }} </span> </button> <button class="yt-uix-button yt-uix-button-size-default yt-uix-button-expander yt-uix-expander-head yt-uix-expander-collapsed-body" type="button" onclick=";return false;" id="show-live-chat-button"> <span class="yt-uix-button-content"> {{ collapsed ? rehike.getText(btn.defaultText) : rehike.getText(btn.toggledText) }} </span> </button> </div> </div> </div> {% endmacro %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{# Implements the main insertion point for the guide. @author Taniko Yamamoto ([email protected]) @author The Rehike Maintainers #} {% macro render(guide) %} {% import "core/spinner.twig" as spinner %} {% from "common/guide/guide_module_content.twig" import render as guide_module_content %} <div id="guide-container"> {% if yt.appbar.guide or yt.spf %} {{ guide_module_content(guide) }} {% else %} <div class="guide-module-content guide-module-loading"> {{ spinner.render(yt.msgs.loading) }} </div> {% endif %} </div> {% endmacro %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{# Render a guide section. #} {% macro render(section, addSeparator) %} <li class="guide-section "> {# Define the title (if it exists) #} {% if section.formattedTitle %} {{ _self.title(section.formattedTitle) }} {% endif %} <ul class="guide-user-links yt-uix-tdl yt-box" role="menu"> {# Include guide items #} {{ _self.item_list(section.items) }} </ul> {% if addSeparator %} <hr class="guide-section-separator"> {% endif %} </li> {% endmacro %} {# Get the title contents, including links #} {% macro title(title) %} <h3> {% if title.runs %} {%- for run in title.runs -%} {% if run.navigationEndpoint %} <a href="{{ rehike.getUrl(run) }}" class="spf-link " data-ytid="{{ run.navigationEndpoint.browseEndpoint.browseId }}" data-name="g-personal">{{ run.text }}</a> {% else %} {{ run.text }} {% endif %} {%- endfor -%} {% elseif title.simpleText %} {% if title.navigationEndpoint %} <a href="{{ rehike.getUrl(title) }}" class="spf-link " data-ytid="{{ title.navigationEndpoint.browseEndpoint.browseId }}" data-name="g-personal">{{ title.simpleText }}</a> {% else %} {{ title.simpleText }} {% endif %} {% endif %} </h3> {% endmacro %} {# Build the section's item list, supporting regular and collapsed entry renderers. #} {% macro item_list(items) %} {% from "common/guide/guide_entry.twig" import render as guide_entry %} {% from "common/guide/guide_collapsible.twig" import render as guide_collapsible %} {% for item in items %} {% if item.guideEntryRenderer %} {{ guide_entry(item.guideEntryRenderer) }} {% elseif item.guideCollapsibleEntryRenderer %} {{ guide_collapsible(item.guideCollapsibleEntryRenderer) }} {% endif %} {% endfor %} {% endmacro %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{% macro render(item) %} {% set externalId = item.idOverride ?? resolveGuideEndpoint(item) %} {% set serialisedEndpoint = serialiseEndpoint(item.navigationEndpoint) %} {% set selected = (serialisedEndpoint == serialiseEndpoint(yt.currentEndpoint)) %} <li id="{{ externalId }}-guide-item" class="guide-channel guide-notification-item overflowable-list-item" role="menuitem"> <a href="{{ item.hrefOverride ?? rehike.getUrl(item) }}" class="guide-item {{ selected ? "guide-item-selected" }} yt-valign spf-link" title="{{ item.titleOverride ?? rehike.getText(item.formattedTitle) }}" data-external-id="{{ externalId }}" data-serialized-endpoint="{{ serialisedEndpoint }}"> <span class="yt-valign-container"> {% if item.thumbnail %} <span class="thumb"> <span class="video-thumb yt-thumb yt-thumb-20"> <span class="yt-thumb-square"> <span class="yt-thumb-clip"> <img data-thumb="{{ item.thumbnail.thumbnails[0].url }}" alt="" onload=";window.__ytRIL && __ytRIL(this)" data-ytimg="1" width="20" height="20" src="{{ PIXEL }}"> <span class="vertical-align"></span> </span> </span> </span> </span> {% elseif item.icon %} <span class="thumb guide-{{ rehike.casing.constantToHyphen(item.icon.iconType) }}-icon yt-sprite"></span> {% endif %} {% set hasCount = item.badges.liveBroadcasting or item.badges.count %} <span class="display-name {{ not hasCount ? "no-count" }}"> <span>{{ item.titleOverride ?? rehike.getText(item.formattedTitle) }}</span> </span> </span> {% if item.badges.liveBroadcasting %} <span class="guide-badge-live yt-uix-tooltip yt-valign" data-tooltip-text="LIVE"> <span class="yt-valign-container"></span> </span> {% elseif item.badges.count %} <span class="guide-count yt-uix-tooltip yt-valign"> <span class="yt-valign-container guide-count-value">{{ item.badges.count }}</span> </span> {% endif %} {# Used by appbar guide templates #} {% if item.appbarGuideNotification %} <div class="appbar-guide-notification guide-item-insertion-notification" role="alert"><span class="appbar-guide-notification-content-wrapper yt-valign"><span class="appbar-guide-notification-icon yt-sprite"></span><span class="appbar-guide-notification-text-content" aria-label="{{ item.appbarGuideNotification.label }}">{{ item.appbarGuideNotification.template }}</span></span></div> {% endif %} </a> </li> {% endmacro %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{# Render a guide subscription section. #} {% macro render(section, addSeparator) %} {% import "common/guide/guide_section.twig" as super %} <li id="guide-subscriptions-section" class="guide-section without-filter"> {{ super.title(section.formattedTitle) }} <div id="guide-subs-footer-container"> <div id="guide-subscriptions-container"> <div class="guide-channels-content yt-scrollbar"> <ul id="guide-channels" class="guide-channels-list guide-item-container parent-list guide-infinite-list yt-uix-scroller filter-has-matches yt-uix-tdl" role="menu" data-scroller-mousewheel-listener="" data-scroller-scroll-listener=""> {{ super.item_list(section.items) }} </ul> </div> </div> </div> {% if addSeparator %} <hr class="guide-section-separator"> {% endif %} </li> {% endmacro %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{# Build the guide signin/signup promo #} {% macro render(section, addSeparator) %} <li class="guide-section guide-header signup-promo"> <p> {{ rehike.getText(section.descriptiveText) }} </p> <div id="guide-builder-promo-buttons" class="signed-out clearfix"> <a href="https://accounts.google.com/ServiceLogin?service=youtube&amp;uilel=3&amp;hl=en&amp;continue=https%3A%2F%2Fwww.youtube.com%2Fsignin%3Fapp%3Ddesktop%26action_handle_signin%3Dtrue%26hl%3Den%26next%3D%252F%26feature%3Dsign_in_promo&amp;passive=true" class="yt-uix-button yt-uix-button-primary yt-uix-button-size-default"><span class="yt-uix-button-content">{{ rehike.getText(section.actionText) }}</span></a> </div> {% if addSeparator %} <hr class="guide-section-separator"> {% endif %} </li> {% endmacro %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{# Render a guide subscription section. #} {% macro render(section, addSeparator) %} {% import "common/guide/guide_section.twig" as super %} {% from "common/uix/button.twig" import render as button %} <li id="guide-subscriptions-section" class="guide-section without-filter"> {{ super.title(section.formattedTitle) }} <div id="guide-subs-footer-container"> <div id="guide-subscriptions-promo" class="default-promo"> {{ button(section.button) }} <div class="subscriptions-wrapper"> <div class="guide-channels-content yt-scrollbar"> <ul id="guide-channels" class="guide-channels-list guide-item-container parent-list guide-infinite-list yt-uix-scroller filter-has-matches yt-uix-tdl"> {{ super.item_list(section.items) }} </ul> </div> <a href="{{ rehike.getUrl(section.tooltip) }}" class="guide-subscriptions-promo-tooltip"> <p> <span class=""> {{ rehike.getText(section.tooltip.text) }} </span> </p> </a> </div> </div> </div> {% if addSeparator %} <hr class="guide-section-separator"> {% endif %} </li> {% endmacro %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{# Build a collapsible guide entry #} {% macro render(content) %} {% from "common/guide/guide_entry.twig" import render as guide_entry %} <div class="guide-collapsible-item yt-uix-expander yt-uix-expander-collapsed" tabindex="0"> <div class="yt-uix-expander-body"> {% for item in content.expandableItems %} {% if item.guideEntryRenderer %} {{ guide_entry(item.guideEntryRenderer) }} {% endif %} {% endfor %} {{ _self.expander_toggle_button(content.collapserItem) }} </div> <div class="yt-uix-expander-collapsed-body"> {{ _self.expander_toggle_button(content.expanderItem) }} </div> </div> {% endmacro %} {# Build a collapsible guide entry's toggle button. #} {% macro expander_toggle_button(data) %} <button class="yt-uix-expander-head guide-view-more yt-valign"> <span class="yt-valign-container"> {{ data.text }} </span> </button> {% endmacro %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{# Implements the main content module of the guide #} {% macro render(guide) %} {% from "common/guide/guide_section.twig" import render as guide_section %} {% from "common/guide/guide_subscriptions_section.twig" import render as guide_subscriptions_section %} {% from "common/guide/guide_subscriptions_promo_section.twig" import render as guide_subscriptions_promo_section %} {% from "common/guide/guide_signin_promo.twig" import render as guide_signin_promo %} <div class="guide-module-content yt-scrollbar"> <ul class="guide-toplevel"> {% for item in guide.items %} {% set addSeparator = not loop.last %} {% if item.guideSectionRenderer %} {{ guide_section(item.guideSectionRenderer, addSeparator) }} {% elseif item.guideSubscriptionsSectionRenderer %} {{ guide_subscriptions_section(item.guideSubscriptionsSectionRenderer, addSeparator) }} {% elseif item.guideSubscriptionsPromoSectionRenderer %} {{ guide_subscriptions_promo_section(item.guideSubscriptionsPromoSectionRenderer, addSeparator) }} {% elseif item.guideSigninPromoRenderer %} {{ guide_signin_promo(item.guideSigninPromoRenderer, addSeparator) }} {% endif %} {% endfor %} </ul> </div> {% endmacro %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{%- from "common/uix/button.twig" import render as button -%} {%- if yt.masthead.a11ySkipNav -%} <button id="a11y-skip-nav" class="skip-nav" data-target-id="content" tabindex="3">{{ yt.masthead.a11ySkipNav }}</button> {%- endif -%} <div id="yt-masthead"> <div class="yt-masthead-logo-container"> {%- if yt.masthead.guideToggle -%} {{ button(yt.masthead.guideToggle) }} <div id="appbar-main-guide-notification-container"></div> {%- endif -%} <span id="yt-masthead-logo-fragment"> <a href="/" id="logo-container" class="masthead-logo-renderer spf-link" title="{{ yt.masthead.logoTooltip }}"> <span class="logo masthead-logo-renderer-logo yt-sprite"></span> {%- if yt.masthead.countryCode -%} <span class="content-region">{{ yt.masthead.countryCode }}</span> {%- endif -%} </a> </span> </div> {%- if yt.signin.isSignedIn -%} <div id="yt-masthead-user" class="yt-uix-clickcard"> {%- else -%} <div id="yt-masthead-signin"> {%- endif -%} {%- for btn in yt.masthead.buttons -%} {{ button(btn) }} {%- endfor -%} </div> {%- if yt.masthead.searchbox -%} <div id="yt-masthead-content"> <form action="/results" id="masthead-search" class="search-form consolidated-form" onsubmit="if (document.getElementById('masthead-search-term').value == '') return false;"> {{ button(yt.masthead.searchbox.button) }} <div id="masthead-search-terms" class="masthead-search-terms-border" dir="ltr"> <input type="text" id="masthead-search-term" class="search-term masthead-search-renderer-input yt-uix-form-input-bidi" autocomplete="off" {{ yt.masthead.searchbox.autofocus ? "autofocus" }} onkeydown="if (!this.value && (event.keyCode == 40 || event.keyCode == 32 || event.keyCode == 34)) {this.onkeydown = null; this.blur();}" name="search_query" value="{{ yt.masthead.searchbox.query }}" placeholder="{{ yt.masthead.searchbox.placeholder }}" title="{{ yt.masthead.searchbox.placeholder }}" aria-label="{{ yt.masthead.searchbox.placeholder }}" aria-haspopup="false" role="combobox" aria-autocomplete="list" dir="ltr" spellcheck="false" style="outline: currentColor none medium;"> </div> </form> </div> {%- endif -%} </div>
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{%- from "common/uix/button.twig" import render as button -%} <div id="footer"> <div id="footer-main"> <div id="footer-logo"> <a href="/" id="footer-logo-link" class="spf-link" title="{{ yt.footer.logoTooltip }}"> <span class="footer-logo-icon yt-sprite"></span> </a> </div> {%- for btn in yt.footer.buttons -%} {{ button(btn) }} {%- endfor -%} </div> <div id="footer-links"> <ul id="footer-links-primary"> {% for link in yt.footer.primaryLinks %} <li> <a href="{{ rehike.getUrl(link) }}">{{ rehike.getText(link) }}</a> </li> {% endfor %} </ul> <ul id="footer-links-secondary"> {% for link in yt.footer.secondaryLinks %} <li> <a href="{{ rehike.getUrl(link) }}">{{ rehike.getText(link) }}</a> </li> {% endfor %} {%- if yt.footer.enableCopyright -%} <li> <span class="copyright" dir="ltr">{{ yt.footer.copyright }}</span> </li> {%- endif -%} </ul> </div> </div>
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{% macro comment_thread(item) %} {% set comment = item.commentThreadRenderer.commentRenderer %} <section class="comment-thread-renderer " data-visibility-types="12" data-priority="0"> {{ _self.comment(comment) }} {% if item.commentThreadRenderer.commentRepliesRenderer %} {% set replies = item.commentThreadRenderer.commentRepliesRenderer %} {% set repliesToken = replies.contents.0.continuationItemRenderer.continuationEndpoint.continuationCommand.token %} <div class="comment-replies-renderer"> <div class="yt-uix-expander yt-uix-expander-collapsed comment-replies-renderer-header" tabindex="0"> <div class="yt-uix-expander-collapsed-body"> {% if replies.viewReplies %} {% set viewRepliesText = rehike.getText(replies.viewReplies.buttonRenderer.text) %} {{ _self.loadMoreLink('action_get_comment_replies', comment.commentId, repliesToken, viewRepliesText, true) }} <div class="yt-uix-expander-head comment-replies-renderer-expander-down comment-replies-renderer-view hid" tabindex="0"> {{ viewRepliesText }} </div> {% endif %} {%- for item in replies.teaserContents -%} {{ _self.comment(item.commentRenderer, true) }} {%- endfor -%} </div> {% if replies.hideReplies %} <div id="comment-replies-renderer-{{ comment.commentId }}" class="yt-uix-expander-body comment-replies-renderer-pages"> <div class="yt-uix-expander-head comment-replies-renderer-expander-up comment-replies-renderer-hide" tabindex="0"> {{ rehike.getText(replies.hideReplies.buttonRenderer.text) }} </div> </div> {% endif %} </div> </div> {% endif %} </section> {% endmacro %} {% macro comment(comment, isReply) %} <div class="comment-renderer {{ comment.isLiked ? "liked" }} " data-visibility-types="12" data-cid="{{ comment.commentId }}"> <a href="{{ rehike.getUrl(comment.authorEndpoint) }}" class="spf-link "> {% set thumbnailSize = (comment.isReply or isReply) ? '32' : '48' %} <span class="video-thumb comment-author-thumbnail yt-thumb yt-thumb-{{ thumbnailSize }}"> <span class="yt-thumb-square"> <span class="yt-thumb-clip"> <img alt="{{ rehike.getText(comment.authorText) }}" data-ytimg="1" height="{{ thumbnailSize }}" onload=";window.__ytRIL &amp;&amp; __ytRIL(this)" role="img" src="{{ comment.authorThumbnail.thumbnails.0.url }}" tabindex="0" width="{{ thumbnailSize }}"> <span class="vertical-align"></span> </span> </span> </span> </a> <div id="comment-renderer-edit-{{ comment.commentId }}" class="comment-simplebox-edit" data-editable-content-text="" data-image-src="" data-video-id=""> </div> <div class="comment-renderer-content"> {% if comment.pinnedCommentBadge %} <div class="comment-renderer-pinned-comment-badge"> {{ rehike.getText(comment.pinnedCommentBadge.pinnedCommentBadgeRenderer.label) }}</div> {% endif %} <div class="comment-renderer-header"> {{ _self.channelLink(comment) }} <span class="comment-renderer-time" tabindex="0"><a href="{{ rehike.getUrl(comment.publishedTimeText.runs[0]) }}" class="spf-link ">{{ rehike.getText(comment.publishedTimeText) }}</a> </span> {%- if comment.linkedCommentBadge -%} <span class="comment-renderer-linked-comment">{{ comment.linkedCommentBadge.metadataBadgeRenderer.label }}</span> {%- endif -%} </div> <div class="comment-renderer-text" tabindex="0" role="article"> <div class="comment-renderer-text-content">{{ _self.textContent(comment.contentText) }}</div> <div class="comment-text-toggle hid"> <div class="comment-text-toggle-link read-more"> <button class="yt-uix-button yt-uix-button-size-default yt-uix-button-link" type="button" onclick="return false;"> <span class="yt-uix-button-content">{{ rehike.getText(comment.expandButton.buttonRenderer.text) }}</span> </button> </div> <div class="comment-text-toggle-link show-less hid"> <button class="yt-uix-button yt-uix-button-size-default yt-uix-button-link" type="button" onclick="return false;"> <span class="yt-uix-button-content">{{ rehike.getText(comment.collapseButton.buttonRenderer.text) }}</span> </button> </div> </div> {% if comment.backstageAttachment.backstageImageRenderer %} {{ _self.backstage_image(comment.backstageAttachment.backstageImageRenderer) }} {% from "common/comments/backstage/image_attachment_viewer.twig" import render as image_attachment_viewer %} {{ image_attachment_viewer(comment) }} {% endif %} </div> <div class="comment-renderer-footer" data-vote-status="INDIFFERENT"> <div class="comment-action-buttons-toolbar"> {%- from "common/uix/button.twig" import render as button -%} {% if comment.replyButton %} {{ button(comment.replyButton) }} {% endif %} {% if comment.voteCount and not comment.voteCount.indifferentText == "0" %} <span class="comment-renderer-like-count off">{{ comment.voteCount.indifferentText }}</span> <span class="comment-renderer-like-count on">{{ comment.voteCount.likedText }}</span> {% else %} <span class="comment-renderer-like-count on">1</span> {% endif %} {{ _self.like_button_group(comment) }} {% if comment.actionButtons.commentActionButtonsRenderer.creatorHeart %} {{ _self.creator_heart(comment.actionButtons.commentActionButtonsRenderer.creatorHeart.creatorHeartRenderer) }} {% endif %} {% if yt.signin.isSignedIn %} <div class="yt-uix-menu-container comment-renderer-action-menu yt-section-hover-container"> <div class="yt-uix-menu yt-uix-menu-flipped hide-until-delayloaded"> <button class="yt-uix-button yt-uix-button-size-default yt-uix-button-action-menu yt-uix-button-empty yt-uix-button-has-icon no-icon-markup yt-uix-menu-trigger" type="button" onclick=";return false;" aria-haspopup="true" aria-label="Action menu." aria-pressed="false" role="button"><span class="yt-uix-button-arrow yt-sprite"></span></button> <div class="yt-uix-menu-content yt-ui-menu-content yt-uix-menu-content-hidden" role="menu"> <ul> <li role="menuitem"> <div class="service-endpoint-action-container hid"> </div> <button type="button" class="yt-ui-menu-item yt-uix-menu-close-on-select report-form-modal-renderer" data-params="GhpVZ3lROGljZVlqcU1ZMDAwbUo1NEFhQUJBZygCMgFGOmkIARACGhpVZ3lROGljZVlqcU1ZMDAwbUo1NEFhQUJBZyoLbXkyaF9fbDQxcWMwAEoVMTEyOTM1MjAzMzA1OTEyODQ0ODg1UACoAQy6ARhVQ202eUQyNkhsYWZ6cU5sWWFLN3VFYUHgAQA%3D" data-url="/flag_service_ajax?action_get_report_form=1"> <span class="yt-ui-menu-item-label">Report</span> </button> </li> </ul> </div> </div> </div> {% endif %} </div> {% if yt.signin.isSignedIn %} <div class="comment-renderer-replybox" id="comment-simplebox-reply-{{ comment.commentId }}"> <span class="video-thumb comment-author-thumbnail yt-thumb yt-thumb-32"> <span class="yt-thumb-square"> <span class="yt-thumb-clip"> <img alt="{{ yt.signin.activeChannel.name }}" data-ytimg="1" height="32" onload=";window.__ytRIL &amp;&amp; __ytRIL(this)" role="img" src="{{ yt.signin.activeChannel.photo }}" tabindex="0" width="32"> <span class="vertical-align"></span> </span> </span> </span> </div> {% endif %} </div> </div> </div> {% endmacro %} {%- macro channelLink(comment) -%} {% if comment.authorIsChannelOwner %} <span class="comment-renderer-author-comment-badge creator"> {% endif %} <a href="{{ comment.authorEndpoint.commandMetadata.webCommandMetadata.url }}" class="comment-author-text spf-link ">{{ rehike.getText(comment.authorText) }}</a> {% set verified = comment.authorCommentBadge.authorCommentBadgeRenderer.icon.iconType %} {% if verified and comment.authorIsChannelOwner %} <span class="yt-badge comment-author-verified-badge yt-uix-tooltip" title="{{ yt.msgs.verified }}"><span class="yt-comment-author-verified-icon yt-sprite"></span></span> {% elseif verified and not comment.authorIsChannelOwner %} <span aria-label="{{ yt.msgs.verified }}" class="yt-channel-title-icon-verified yt-uix-tooltip yt-sprite" data-tooltip-text="{{ yt.msgs.verified }}"></span> {% endif %} {% if comment.authorIsChannelOwner %} </span> {% endif %} {%- endmacro -%} {%- macro textContent(content) -%} {%- for run in content.runs -%} {%- if run.navigationEndpoint -%}{%- apply spaceless -%} {%- set href = rehike.getUrl(run) -%} {%- set spf = (href|first == "/") -%} <a href="{{ href }}" class=" {{ spf ? 'spf-link' }}" target="_blank">{{ run.text|spaceless }}</a> {%- endapply -%}{%- elseif run.emoji.isCustomEmoji -%} <img class="yt-comments-custom-emoji {{ loop.first and loop.last ? 'large' }} yt-uix-tooltip" title="{{ run.text }}" alt="{{ run.text }}" src="{{ run.emoji.image.thumbnails.0.url }}"> {%- else -%} {{ run.bold ? '<b>' }}{{ run.italics ? '<i>' }}{{ run.strikethrough ? '<s>' }}{{ run.text }}{{ run.strikethrough ? '</s>' }}{{ run.italics ? '</i>' }}{{ run.bold ? '</b>' }} {%- endif -%} {%- endfor -%} {%- endmacro -%} {% macro loadMoreWidget(token) %} <button class="yt-uix-button yt-uix-button-size-default yt-uix-button-default load-more-button yt-uix-load-more comment-section-renderer-paginator " type="button" onclick=";return false;" aria-label="{{ yt.msgs.showMore }}" data-uix-load-more-target-id="comment-section-renderer-items" data-uix-load-more-post-body="page_token={{ token }}" data-uix-load-more-href="/comment_service_ajax?action_get_comments=1" data-sessionlink-target="/comment_service_ajax?action_get_comments=1" data-uix-load-more-post="true"> <span class="yt-uix-button-content"> <span class="load-more-loading hid"> <span class="yt-spinner"> <span title="Loading icon" class="yt-spinner-img yt-sprite"></span> {{ yt.msgs.loading }} </span> </span> <span class="load-more-text"> {{ yt.msgs.showMore }} </span> </span> </button> {% endmacro %} {% macro loadMoreLink(action, commentId, token, text, style_down_arrow) %} <button class="yt-uix-button yt-uix-button-size-default yt-uix-button-default load-more-button yt-uix-load-more comment-replies-renderer-paginator {{ style_down_arrow ? 'comment-replies-renderer-expander-down' }} yt-uix-button-link" type="button" onclick=";return false;" aria-label="{{ text }}" data-uix-load-more-href="/comment_service_ajax?{{ action }}=1" data-uix-load-more-post="true" data-uix-load-more-post-body="page_token={{ token }}" data-uix-load-more-target-id="comment-replies-renderer-{{ commentId }}"><span class="yt-uix-button-content"> <span class="load-more-loading hid"> <span class="yt-spinner"> <span class="yt-spinner-img yt-sprite" title="Loading icon"></span> {{ yt.msgs.loading }} </span> </span> <span class="load-more-text"> {{ text }} </span> </span></button> {% endmacro %} {% macro like_button_group(comment) %} {%- from "common/uix/button.twig" import render as button -%} <span role="radiogroup"> {%- if comment.likeButton -%} {{ button(comment.likeButton) }} {%- endif -%} {{ " " }} {%- if comment.dislikeButton -%} {{ button(comment.dislikeButton) }} {%- endif -%} </span> {% endmacro %} {% macro creator_heart(data) %} {# Creator heart is noticeably lazy #} {% set isEnabled = data.isEnabled %} {% set isHearted = data.isHearted %} {# The tooltip isn't ever swapped out, so handling it differently would be even weirder. This will unfortunately just have to say "Love" if the action is to unlove. Aria label does get swapped out, but the tooltip text is static. #} {% set defaultTooltip = data.unheartedTooltip %} {% set heartedTooltip = data.heartedTooltip %} {% set styleClass = isHearted ? "hearted" : "unhearted" %} <button class="yt-uix-creator-heart-button yt-uix-tooltip" aria-label="{{ isHearted ? heartedTooltip : defaultTooltip }}" data-tooltip-text="{{ isHearted ? heartedTooltip : defaultTooltip }}"{% if isEnabled %} data-aria-hearted="{{ data.heartedTooltip }}" data-aria-unhearted="{{ data.unheartedTooltip }}" {% if isHearted %} data-action-on="1" {% endif %} data-action-heart="{{ data.heartEndpoint.performCommentActionEndpoint.action }}" data-action-unheart="{{ data.unheartEndpoint.performCommentActionEndpoint.action }}" data-url="/comment_service_ajax?action_perform_comment_action=1" {% endif %}> <div class="creator-heart"> <img src="{{ data.creatorThumbnail.thumbnails.0.url }}" class="creator-heart-background-{{ styleClass }}"> <div class="creator-heart-big-{{ styleClass }}"></div> <div class="creator-heart-small-{{ styleClass }}"> <div class="creator-heart-small-container"> <div class="creator-heart-small-left" style="background: #ff0000;"></div> <div class="creator-heart-small-right" style="background: #ff0000;"></div> </div> </div> </div> </button> {% endmacro %} {% macro backstage_image(data) %} <div class="comment-renderer-image-attachment yt-lockup-thumbnail yt-uix-image-attachment yt-uix-image-viewer" style="cursor: pointer;" role="button" tabindex="0"> <img class="comment-image" src="{{ data.image.thumbnails.0.url }}"> </div> {% endmacro %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
<div class="comment-simplebox" id="comment-simplebox"> <div class="comment-simplebox-arrow"> <div class="arrow-inner"></div> <div class="arrow-outer"></div> </div> <div class="comment-simplebox-frame"> <div class="comment-simplebox-prompt"></div> <div class="comment-simplebox-text" role="textbox" aria-multiline="true"></div> </div> <div class="comment-simplebox-controls"> <div class="comment-simplebox-error-message hid" data-placeholder="{{ yt.msgs.commentPostFail }}"></div> <div class="comment-simplebox-buttons"><span class="comment-simplebox-character-counter"></span><button class="yt-uix-button yt-uix-button-size-default yt-uix-button-default comment-simplebox-cancel" type="button" onclick=";return false;"><span class="yt-uix-button-content">Cancel </span></button><button class="yt-uix-button yt-uix-button-size-default yt-uix-button-primary yt-uix-button-empty comment-simplebox-submit " type="button" onclick=";return false;" data-zero-step-params="" data-params="" data-target=""></button> </div> </div> <span class="yt-spinner-img comment-simplebox-loading yt-sprite" title="Loading icon"></span> </div>
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{% macro render(data) %} {% import '/common/comments/main.twig' as main %} <div id="comment-section-renderer" class="comment-section-renderer " data-child-tracking="CAAQg2ciEwj8hczq9ovhAhWBksQKHcGjAPw"> {% if data.headerRenderer %} {% from "common/comments/header.twig" import render as header %} {{ header(data.headerRenderer) }} {% endif %} <div class="comment-section-renderer-items" id="comment-section-renderer-items"> {# spinner img for switching view #} <span class="yt-spinner-img comment-section-items-loading yt-sprite" title="Loading icon"></span> {% for item in data.comments.commentThreads %} {{ main.comment_thread(item) }} {% endfor %} </div> {% if data.comments.commentContinuationRenderer %} {{ main.loadMoreWidget(data.comments.commentContinuationRenderer.token) }} {% endif %} {% include '/common/comments/simplebox.twig' %} <div class="feedback-banner hid" aria-live="polite"></div> <span class="yt-spinner-img comment-renderer-loading yt-sprite" title="Loading icon"></span> <div class="hid" id="comment-renderer-abuse"> <div class="comment-renderer-abuse-content"></div> </div> </div> {% endmacro %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{# Used by comment service ajax should still be cleaned up but I'm keeping it relatively in tact until then. #} {% import '/common/comments/main.twig' as main %} {{ include("/common/comments/comments_list.twig") }} {% if yt.page.repliesContinuationRenderer %} {% set continuation = yt.page.repliesContinuationRenderer %} {{ main.loadMoreLink('action_get_comment_replies', yt.page.repliesTargetId, continuation.token, rehike.getText(continuation.text)) }} {% endif %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{% macro render(data) %} <div class="comments-header-renderer " data-visibility-types="12"> {% if data.commentsCountEndpoint %} <a href="{{ rehike.getUrl(data.commentsCountEndpoint) }}" class="spf-link comment-section-header-renderer"> {% endif %} <h2 class="comment-section-header-renderer" tabindex="0"> <b>{{ data.title }}</b>{% if data.commentsCountText %} • {{data.commentsCountText}}{% endif %} </h2> {% if data.commentsCountEndpoint %} </a> {% endif %} <div class="comment-simplebox-renderer {{ not yt.signin.isSignedIn ? "" }}"> <span class="video-thumb comment-author-thumbnail yt-thumb yt-thumb-48"> <span class="yt-thumb-square"> <span class="yt-thumb-clip"> <img alt="{{ data.simpleBoxRenderer.authorThumbnail.accessibility.accessibilityData.label }}" height="48" onload=";window.__ytRIL &amp;&amp; __ytRIL(this)" src="{{ rehike.getThumb(data.simpleBoxRenderer.authorThumbnail, 48) }}" width="48" data-ytimg="1" tabindex="0" role="img"> <span class="vertical-align"></span> </span> </span> </span> {% if yt.signin.isSignedIn %}<div id="comment-simplebox-create-comment"></div>{% endif %} <div class="comment-simplebox-renderer-collapsed comment-{{ yt.signin.isSignedIn ? "simplebox-trigger" : "section-renderer-redirect" }}" data-target="comment-section-renderer-items" data-simplebox-params="{{ data.createParams }}" data-simplebox-target="{{ yt.signin.isSignedIn ? "/comment_service_ajax?action_create_comment=1" : "https://accounts.google.com/ServiceLogin?service=youtube&passive=true&hl=en&continue=https%3A%2F%2Fwww.youtube.com%2F" }}"{% if yt.signin.isSignedIn %}role="form" aria-haspopup="true" data-simplebox-id="comment-simplebox-create-comment" data-placeholder="{{ data.simpleBoxRenderer.placeholderText }}" data-simplebox-event="commentcreated" data-simplebox-label="Comment" data-simplebox-sessionlink="itct=CAgQ8FsiEwjpsvbIjMTtAhU3yMEKHRZcD6w" data-simplebox-zero-step-params="" data-attachment-editor-trigger=""{% endif %}> <div class="comment-simplebox-renderer-collapsed-content">{{ data.simpleBoxRenderer.placeholderText }}</div> <div class="comment-simplebox-arrow"> <div class="arrow-inner"></div> <div class="arrow-outer"></div> </div> </div> </div> {% if data.sortRenderer %} {% set sortRenderer = data.sortRenderer %} <div class="yt-uix-menu comment-section-sort-menu"> <button class="yt-uix-button yt-uix-button-size-default yt-uix-button-default yt-uix-menu-trigger" type="button" onclick=";return false;" aria-haspopup="true" aria-label="Sort comments" aria-pressed="false" role="button"> <span class="yt-uix-button-content">{{ sortRenderer.title }}</span> <span class="yt-uix-button-arrow yt-sprite"></span> </button> <div class="yt-uix-menu-content yt-ui-menu-content yt-uix-menu-content-hidden" role="menu"> <ul> {% for item in sortRenderer.items %} <li> <button type="button" class="yt-ui-menu-item yt-uix-menu-close-on-select comment-section-sort-menu-item " data-menu_name="{{ item.menuName }}" data-sessionlink-target="/comment_service_ajax?action_get_comments=1" data-token="{{ item.continuation }}" data-url="/comment_service_ajax?action_get_comments=1"> <span class="yt-ui-menu-item-label">{{ item.title }}</span> </button> </li> {% endfor %} </ul> </div> </div> {% endif %} <div class="yt-alert yt-alert-naked yt-alert-success hid zero-step-tooltip"> <div class="yt-alert-icon"> <span class="icon master-sprite yt-sprite"></span> </div> <div class="yt-alert-content" role="alert"></div> </div> </div> {% endmacro %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{# Used by comment service ajax should still be cleaned up but I'm keeping it relatively in tact until then. #} {% import '/common/comments/main.twig' as main %} {% for item in yt.page.commentThreads %} {{ main.comment_thread(item) }} {% endfor %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{# Used by comment service ajax should still be cleaned up but I'm keeping it relatively in tact until then. #} {% import '/common/comments/main.twig' as main %} {% for item in yt.page.comments %} {{ main.comment(item) }} {% endfor %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{% macro render(comment) %} {% import "common/comments/main.twig" as comments %} <div class="image-attachment-viewer hid" tabindex="0"> <img class="i-a-v-image" src="{{ comment.backstageAttachment.backstageImageRenderer.image.thumbnails.0.url }}"> <div class="i-a-v-comment-chrome"> <div class="i-a-v-top-gradient"></div> <button class="yt-uix-button yt-uix-button-size-default yt-uix-button-empty yt-uix-button-has-icon no-icon-markup i-a-v-close" type="button" onclick=";return false;"></button> <div class="i-a-v-comment-background"> <div class="i-a-v-comment-header"> <a href="{{ comment.authorEndpoint.commandMetadata.webCommandMetadata.url }}" class="i-a-v-comment-author-text spf-link "> {{ rehike.getText(comment.authorText) }} </a> <span class="i-a-v-comment-renderer-time"> <a href="{{ comment.publishedTimeText.runs.0.navigationEndpoint.commandMetadata.webCommandMetadata.url }}" class=" spf-link "> {{ comment.publishedTimeText.runs.0.text }} </a> </span> <span class="i-a-v-like-count off">{{ comment.voteCount.indifferentText }}</span> <span class="i-a-v-like-count on">{{ comment.voteCount.likedText }}</span> {{ comments.like_button_group(comment) }} </div> <div class="i-a-v-comment-text-content" tabindex="0">{{ comments.textContent(comment.contentText) }}</div> </div> </div> </div> {% endmacro %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
<div id="creator-page" class="clearfix ytg-box {% block creator_page_class %}{% endblock %}"> <div id="creator-page-sidebar" class="ytg-1col yt-card"> {% block creator_page_sidebar %}{% endblock %} </div> <div id="creator-page-content" class="ytg-fl yt-card {% block creator_page_content_class %}{% endblock %}"> {% block creator_page_content %}{% endblock %} </div> </div>
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{% macro render(data) %} <ul id="creator-sidebar" class="ytg1-col {{ data.sections|length == 1 ? "single-section" }}"> {% for section in data.sections %} {% if section.creatorSidebarSectionRenderer %} {% set this = section.creatorSidebarSectionRenderer %} <li id="creator-sidebar-section-id-{{ this.targetId }}" class="creator-sidebar-section {{ this.isSelected ? "selected" }}"> <h3>{{ rehike.getText(this.title) }}</h3> <ul class="creator-sidebar-submenu"> {% for item in this.items %} {% if item.creatorSidebarItemRenderer %} {{ _self.item(item.creatorSidebarItemRenderer) }} {% endif %} {% endfor %} </ul> </li> {% endif %} {% endfor %} </ul> {% endmacro %} {% macro item(data) %} <li class="creator-sidebar-item spf-link {{ data.isSelected ? "selected" }}"> <a href="{{ rehike.getUrl(data) }}" class="creator-sidebar-item-link"> {{ rehike.getText(data.title) }} </a> </li> {% endmacro %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{% macro render(data) %} {% from "common/uix/button.twig" import render as button %} <div class="search-header yt-uix-expander yt-uix-expander-collapsed"> <div class="filter-top"> <div class="filter-bar-container"> {%- if data.button.toggleButtonRenderer -%} <div class="filter-button-container"> {% set btn = data.button.toggleButtonRenderer %} {{ button({ style: "STYLE_DEFAULT", size: "SIZE_SMALL", accessibility: btn.accessibility, text: btn.defaultText, class: [ "filter-button", "yt-uix-expander-head", ], attributes: { "button-menu-id": "some-nonexistent-menu", "button-action": "", "button-toggle": "true" }, hasArrow: true }) }} </div> {%- if not data.filterCrumbs is empty -%} <ul class="filter-crumb-list"> {%- for crumb in data.filterCrumbs -%} <li class="filter-crumb" title="{{ crumb.tooltip }}"> <a href="{{ rehike.getUrl(crumb) }}" class="filter spf-link" aria-label="{{ crumb.tooltip }}"> <span class="filter-text filter-ghost">{{ rehike.getText(crumb.label) }}</span> <span class="yt-close">×</span> </a> </li> {%- endfor -%} </ul> {%- else -%} <div class="filter-crumb-spacer"></div> {%- endif -%} {%- endif -%} <p class="num-results first-focus" tabindex="0">{{ data.resultCountText }}</p> </div> </div> {%- if data.groups -%} <div id="filter-dropdown" class="yt-uix-expander-body"> {%- for group in data.groups -%} {%- if group.searchFilterGroupRenderer -%} {%- set this = group.searchFilterGroupRenderer -%} <div class="filter-col"> <h4 class="filter-col-title">{{ rehike.getText(this.title) }}</h4> <ul> {%- for sFilter in this.filters -%} {%- if sFilter.searchFilterRenderer -%} {%- set thisF = sFilter.searchFilterRenderer -%} <li> {%- if not thisF.status or (thisF.status == "FILTER_STATUS_SELECTED" and thisF.navigationEndpoint) -%} <a href="{{ rehike.getUrl(thisF) }}" class="filter {{ thisF.status == "FILTER_STATUS_SELECTED" ? "filter-selected" }} spf-link" title="{{ thisF.tooltip }}" aria-label="{{ thisF.tooltip }}"> <span class="filter-text filter-ghost">{{ rehike.getText(thisF.label) }}</span> {{ thisF.status ? '<span class="yt-close">×</span>' }} </a> {%- elseif thisF.status == "FILTER_STATUS_SELECTED" -%} <span class="filter filter-selected filter-sort" title="{{ thisF.tooltip }}"> <span class="filter-text" aria-label="{{ thisF.tooltip }}">{{ rehike.getText(thisF.label) }}</span> </span> {%- elseif thisF.status == "FILTER_STATUS_DISABLED" -%} <span class="filter filter-disabled" title="{{ thisF.tooltip }}"> <span class="filter-text" aria-label="{{ thisF.tooltip }}">{{ rehike.getText(thisF.label) }}</span> </span> {%- endif -%} </li> {%- endif -%} {%- endfor -%} </ul> </div> {%- endif -%} {%- endfor -%} {%- if data.clearAll -%} <div class="clear-filters"> <a href="{{ rehike.getUrl(data.clearAll) }}" class="filter spf-link">{{ rehike.getText(data.clearAll) }}</a> </div> {%- endif -%} </div> {%- endif -%} </div> {% endmacro %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{%- macro render(data, videoId) -%} {% import "common/uix/button.twig" as btn %} {% if yt.signin.isSignedIn %} {{ btn.render({ size: "SIZE_SMALL", style: "STYLE_DEFAULT", icon: { noIconMarkupOverride: true }, tooltip: data.isToggled ? data.toggledTooltip : data.untoggledTooltip, class: [ "addto-button", "video-actions", "spf-nolink", "hide-until-delayloaded", data.isToggled ? "addto-watch-later-button-success" : "addto-watch-later-button" ], customAttributes: { "data-video-ids": videoId } }) }} {% else %} {{ btn.render({ size: "SIZE_SMALL", style: "STYLE_DEFAULT", icon: { noIconMarkupOverride: true }, tooltip: data.isToggled ? data.toggledTooltip : data.untoggledTooltip, class: [ "addto-button", "video-actions", "spf-nolink", "hide-until-delayloaded", "addto-watch-later-button-sign-in" ], customAttributes: { "data-video-ids": videoId, "data-button-menu-id": "shared-addto-watch-later-login" } }) }} {% endif %} {% endmacro %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{%- macro render(data, target) -%} <div class="yt-uix-menu yt-uix-videoactionmenu " data-menu-content-id="{{ data.contentId }}" data-video-id="{{ data.videoId }}"> {{ target }} </div> {%- endmacro -%}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{%- macro render(data, target) -%} {% from "common/uix/menu_item.twig" import render as menu_item %} <div class="yt-uix-menu {% for class in data.containerClass %}{{ class }}{{ not loop.last ? " " }}{% endfor %}"> {{ target }} <div class="yt-uix-menu-content yt-ui-menu-content yt-uix-menu-content-hidden" role="menu"> <ul{% if data.menuId %} id="{{ data.menuId }}"{% endif %}{% if data.menuClass %} class="{% for class in data.menuClass %}{{ class }}{{ not loop.last ? " " }}{% endfor %}"{% endif %}> {% for item in data.items %} {{ menu_item(item) }} {% endfor %} </ul> </div> </div> {%- endmacro -%}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{%- macro render(data) -%} {%- if not data is empty -%} {% set wrapped = _self._menuitemWrapper(data) %} {%- if data.clickcard and not data.manualClickcardWrapper -%} {% from "/common/uix/clickcard_wrapper.twig" import render as clickcard %} {{ clickcard(data.clickcard, wrapped) }} {%- elseif data.menu and not data.manualMenuWrapper -%} {% from "/common/uix/menu_wrapper.twig" import render as menu %} {{ menu(data.menu, wrapped) }} {%- elseif data.videoActionsMenu and not data.manualMenuWrapper -%} {% from "/common/uix/video_action_menu_wrapper.twig" import render as video_action_menu %} {{ video_action_menu(data.videoActionsMenu, wrapped) }} {%- else -%} {{ wrapped }} {%- endif -%} {%- endif -%} {%- endmacro -%} {% macro _menuitemWrapper(data) %} <button class="yt-ui-menu-item {% if data.hasIcon %} has-icon {% endif %} {% if data.closeOnSelect %} yt-uix-menu-close-on-select {% endif %} {% if data.actionPanelTrigger %} action-panel-trigger action-panel-trigger-{{ data.actionPanelTrigger }} {% endif %} {% for class in data.class %} {{ class }} {% endfor %} {% if data.clickcard %} yt-uix-clickcard-target {% endif %}" type="button" {% if data.actionPanelTrigger and not data.fakeActionPanel %} data-trigger-for="action-panel-{{ data.actionPanelTrigger }}" {% endif %} {% for name, value in data.attributes %} data-{{ name }}="{{ value }}" {% endfor %} > <span class="yt-ui-menu-item-label">{{ data.label }}</span> </button> {% endmacro %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{% macro render(continuation, target, autoload = false, endpoint = "browse_ajax") %} <button class="yt-uix-button yt-uix-button-size-default yt-uix-button-default load-more-button yt-uix-load-more browse-items-load-more-button yt-uix-sessionlink yt-uix-load-more-error {{ autoload ? "scrolldetect" }}" aria-label="Load more" onclick=";return false;" data-sessionlink-target="/{{ endpoint }}action_continuation=1&amp;continuation={{ continuation }}&amp;direct_render=1&amp;target_id={{ target }}" data-uix-load-more-href="/{{ endpoint }}?action_continuation=1&amp;continuation={{ continuation }}&amp;direct_render=1&amp;target_id={{ target }}" data-uix-load-more-target-id="{{ target }}"> <span class="yt-uix-button-content"> <span class="load-more-loading hid" style="display: none;"> <span class="yt-spinner"> <span class="yt-spinner-img yt-sprite" title="Loading icon"></span> {{ yt.msgs.loading }} </span> </span> </span> <span class="load-more-text">Load more</span> </button> {% endmacro %}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{% import '/core/spinner.twig' as spinner %} <div class="yt-dialog hid " {{ id ? ('id="' ~ id ~ '"')|raw }}> <div class="yt-dialog-base"> <span class="yt-dialog-align"></span> <div class="yt-dialog-fg" role="dialog"> <div class="yt-dialog-fg-content"> <div class="yt-dialog-loading"> <div class="yt-dialog-waiting-content"> {{ spinner.render(yt.msgs.loading) }} </div> </div> <div class="yt-dialog-content"> {% block dialog_content %}{% endblock %} </div> <div class="yt-dialog-working"> <div class="yt-dialog-working-overlay"></div> <div class="yt-dialog-working-bubble"> <div class="yt-dialog-waiting-content"> {{ spinner.render(yt.msgs.working) }} </div> </div> </div> </div> <div class="yt-dialog-focus-trap" tabindex="0"></div> </div> </div> </div>
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }
{%- macro render(data, target) -%} <span {% if data.id %}id="{{ data.id }}" {% endif %} class="yt-uix-clickcard" {% if data.cardClass %}data-card-class="{% for class in data.cardClass %}{{ class }}{{ not loop.last ? " " }}{% endfor %}"{% endif %} {% if data.cardAction %}data-card-action="{{ data.cardAction }}"{% endif %}> {{ target }} <div {% if data.cardId %}id="{{ data.cardId }}" {% endif %}class="{{ data.class }} yt-uix-clickcard-content"> {% include "/common/clickcard/" ~ data.template ~ ".twig" ignore missing with {data: data.content} %} </div> </span> {%- endmacro -%}
{ "repo_name": "Rehike/Rehike", "stars": "81", "repo_language": "PHP", "file_name": "config.php", "mime_type": "text/x-php" }