Skip to content

Instantly share code, notes, and snippets.

王集鹄 zswang

Block or report user

Report or block zswang

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@zswang
zswang / cloudSettings
Last active Sep 13, 2018
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2018-09-13T07:00:00.298Z","extensionVersion":"v3.1.2"}
@zswang
zswang / tag_class_count.js
Created Mar 15, 2018
Get the number of elements in the current page
View tag_class_count.js
console.log(
[...document.querySelectorAll("*")]
.map(el => el.nodeName)
.sort()
.filter((item, index, arr) => arr[index - 1] !== item).length
);
var s = new Set();
[...document.querySelectorAll("*")].forEach(el => s.add(el.nodeName));
console.log(s.size);
You can’t perform that action at this time.