This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var i = 0; | |
| var myVar = setInterval(myTimer, 3000); | |
| function myTimer () { | |
| var els = document.getElementById("grid-container").getElementsByClassName("ytd-expanded-shelf-contents-renderer"); | |
| if (i < els.length) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function string_to_slug(str) { | |
| str = str.replace(/^\s+|\s+$/g, ""); // trim | |
| str = str.toLowerCase(); | |
| // remove accents, swap ñ for n, etc | |
| var from = "åàáãäâèéëêìíïîòóöôùúüûñç·/_,:;"; | |
| var to = "aaaaaaeeeeiiiioooouuuunc------"; | |
| for (var i = 0, l = from.length; i < l; i++) { | |
| str = str.replace(new RegExp(from.charAt(i), "g"), to.charAt(i)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function get_youtube_id(url){ | |
| id = ''; | |
| url = url.replace(/(>|<)/gi,'').split(/(vi\/|v=|\/v\/|youtu\.be\/|\/embed\/)/); | |
| if(url[2] !== undefined) { | |
| id = url[2].split(/[^0-9a-z_\-]/i); | |
| id = id.toString(); | |
| } | |
| else id = url; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DELIMITER // | |
| CREATE FUNCTION `ToSEO`(input TEXT) | |
| RETURNS TEXT | |
| BEGIN | |
| DECLARE output TEXT DEFAULT ''; | |
| DECLARE iterator INT DEFAULT 1; | |
| WHILE iterator < (LENGTH(input) + 1) DO | |
| IF SUBSTRING(input, iterator, 1) IN (' ', '-') | |
| THEN |