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 testCases = [ | |
[[1, 2, 3, 7, 8, 9], "1-3, 7-9"], | |
[[1, 2, 3, 1, 2, 3], "1-3, 1-3"], | |
[[0, 1, 1, 2], "0-1, 1-2"], | |
[[0, 7, 6, 5], "0, 7, 6, 5"], | |
[[0], '0'], | |
[[], ''] | |
] | |
for (let i = 0; i < testCases.length; 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_photos_count(card){ | |
let scroller=card.querySelector(`.Expand>.CenterAlign.Fld\\(r\\)`); | |
if(!scroller) | |
return 1 | |
else | |
return scroller.childNodes.length | |
} | |
function get_name(card){ | |
return card.querySelector(".Flw\\(w\\)").innerHTML.trim(); | |
} |
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
//toSource polyfill | |
//https://raw.githubusercontent.com/oliver-moran/toSource.js/master/toSource.min.js | |
if("undefined"==typeof Object.toSource){var js_id=/^(?!(?:do|if|in|for|let|new|try|var|case|else|enum|eval|null|this|true|void|with|break|catch|class|const|false|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$)[\x24A-Z\x5Fa-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985- |