Skip to content

Instantly share code, notes, and snippets.

@y-ack
Last active October 18, 2021 13:24
Show Gist options
  • Save y-ack/453a3d7e99bc8da95ef7c52c0b0e6bf5 to your computer and use it in GitHub Desktop.
Save y-ack/453a3d7e99bc8da95ef7c52c0b0e6bf5 to your computer and use it in GitHub Desktop.
Generates some kind of tree structure of an HTML document for CSS
How to read generated maps:
+-- is a branch. a branch will be a child of the parent element above it
Element details are in the format
+--name[.class][#ID][ (input type)][ :[href]][ :[target]]
element
.class
#ID
(input type)
:["href/target"]
<a class="wacky" id="mine" href="/away" thingsyoudontcareabout="t" value="900000"> would yield
a.wacky#mine :["/away"]
An example map:
HTML
+--body
| +--div.header
| | +--div.user
| | | +--a :["https://smilebasicsource.com/userhome"]
| | | | +--img.avatar
| | | +--form.logout smallform
| | | | +--input (hidden)
| | | | +--input (submit)
| | +--div.navigation
| | | +--a.active :["https://smilebasicsource.com/"]
| | | +--a :["https://smilebasicsource.com/activity"]
| | | +--a :["https://smilebasicsource.com/search"]
| | | +--a :["https://smilebasicsource.com/forum"]
| | | +--a :["http://smilebasicsource.com/chat"] :["_blank"]
| | +--div.title
| | | +--h1
| +--div.maincontent
| | +--div.home
| | | +--h1
| | | +--ul.showcase
| | | | +--li
| | | | | +--img.preview
| | | | | +--a.title :["https://smilebasicsource.com/page?pid=790"]
| | | | | +--span.tagline
| | | | ...
| | | +--div.block
| | | | +--h3
| | | | +--p
| | | | | +--a :["http://smilebasic.com/en/"]
| | | | ...
| | | ...
| +--div.footer
| | +--a :["https://smilebasicsource.com/about"]
| | +--a :["https://smilebasicsource.com/privacypolicy"]
| | +--form#highCompatibilityForm
| | | +--input (hidden)
| | | ...
| | | +--input (submit)
HTML
+--body.flex
| +--header.titlePane bar rem2-3 loadBG#$titlePane
| | +--div.pageCreate textItem rightAlign
| | | +--div.buttonContainer item
| | | | +--button#$openSidebar (submit)
| | +--a.textItem :["https://oboy.smilebasicsource.com/12/?"]
| | | +--img.item
| | +--noscript
| | +--v-b
| | | +--span#$path
| | | | +--a.textItem pre entity-title :["https://oboy.smilebasicsource.com/12/?category/0"]
| | | | +--span.pathSeparator textItem
| | | | +--a.textItem pre entity-title :["https://oboy.smilebasicsource.com/12/?category/645"]
| | | | +--span.pathSeparator textItem
| | +--h1.textItem pageTitle#$pageTitle
| | | +--span.item icon iconBg
| | | +--span.textItem pre entity-title
| | +--v-b
| | | +--a.textItem loggedIn myUserPage#$editUserPage
| | +--div.item loggedIn myUserPage
| | | +--div.textItem userMode#$userPageStatus
| | +--v-b
| | | +--input.item#$titleInput (text)
| | | +--div.buttonContainer item
| | | | +--button#$submitEdit (submit)
| | | ...
| | +--v-b.canEdit
| | | +--a.textItem#$pageEditLink :["https://oboy.smilebasicsource.com/12/?editpage/937"]
| +--horizontal-split.grow flex-row
| | +--main.flex grow#$realMain
| | | +--v-b
| | | | +--div.buttonContainer
| | | | | +--button#$toggleEditorMode (submit)
| | | +--v-b.editorNotPreview
| | | | +--div.registerBox
| | | | | +--label
| | | | | | +--input#$keywords (text)
| | | | | +--br
| | | | | +--label
| | | | | | +--select#$editPageType (select-one)
| | | | | | | +--option#$editPageTypeOption
| | | | | | | +--option
| | | | | | | ...
| | | | | +--br
| | | | | +--label
| | | | | | +--input#$editPageThumbnail (number)
| | | | | +--br
| | | | | +--label
| | | | | | +--input#$editPagePhotos (text)
| | | | | +--br
| | | | | +--label
| | | | | | +--span#$editPageCategory
| | | | | | | +--select (select-one)
| | | | | +--br
| | | | | +--label
| | | | | | +--input#$editPagePinned (text)
| | | | | +--br
| | | | ...
| | | | +--label
| | | | | +--select#$markupSelect (select-one)
| | | | | | +--option
| | | | | | ...
| | | | +--div.buttonContainer
| | | | | +--button#$markupUpdate (submit)
| | | +--v-b.rem1-7 bar nav
| | | | +--span#$fileNav
| | | | | +--div.buttonContainer item
| | | | | | +--button (submit)
| | | | | ...
| | | | | +--span.textItem pre
| | | | +--label
| | | | +--input#$fileSearchBucket (text)
| | | | +--div.rightAlign
| | | +--v-b.fileBox bar#$fileBox
| | | +--v-b
| | | | +--div.buttonContainer fileUploading
| | | | | +--button#$fileUploadButton (submit)
| | | | +--div.fileSelected
| | | | | +--div.buttonContainer loggedIn
| | | | | | +--button#$setAvatarButton (submit)
| | | | | +--table.form
| | | | | | +--tbody
| | | | | | | +--tr
| | | | | | | | +--th
| | | | | | | | +--td.bar rem1-7#$fileUser
| | | | | | | ...
| | | | | +--div.buttonContainer fileUpdateButton canEdit loggedIn
| | | | | | +--button#$fileUpdateButton (submit)
| | | +--v-b.nav bar rem1-7#$memberNav
| | | | +--div.buttonContainer item
| | | | | +--button (submit)
| | | | ...
| | | | +--span.textItem pre
| | | +--v-b.nav
| | | | +--input#$chatlogSearchText (text)
| | | | ...
| | | | +--div.buttonContainer
| | | | | +--button#$chatlogSearchButton (submit)
| | | +--main-scrollable.flex grow#$main
| | | | +--v-b.userPageBox flex-row
| | | | | +--a#$userPageAvatarLink
| | | | | | +--img.userPageAvatar#$userPageAvatar
| | | | | +--div.pageContents pre userPageContents markup-root#$userPageContents
| | | | +--v-b
| | | | | +--label
| | | | | | +--input#$cateditPinned (text)
| | | | | +--br
| | | | | +--label
| | | | | | +--input#$cateditCategory (number)
| | | | | +--br
| | | | | +--label
| | | | | | +--input#$cateditPermissions (text)
| | | | | +--br
| | | | | +--label
| | | | | | +--input#$cateditLocalSupers (text)
| | | | | +--br
| | | | | +--textarea#$cateditDescription (textarea)
| | | | | +--br
| | | | +--v-b.image-box fill
| | | | | +--img#$filePageView
| | | | +--v-b.categoryDescription pre pageContents markup-root#$categoryDescription
| | | | +--v-b#$categoryCategories
| | | | ...
| | | | +--v-b.page-select rem1-7 bar
| | | | | +--span#$categoryNav
| | | | | | +--div.buttonContainer item
| | | | | | | +--button (submit)
| | | | | | ...
| | | | | | +--span.textItem pre
| | | | | +--div.buttonContainer item
| | | | | | +--a :["https://oboy.smilebasicsource.com/12/?editpage?cid=49"]
| | | | | | | +--button#$createPage (submit)
| | | | | +--div.buttonContainer item canEdit
| | | | | | +--a :["https://oboy.smilebasicsource.com/12/?editcategory/49"]
| | | | | | | +--button#$editCategory (submit)
| | | | +--v-b.categoryPages#$categoryPages
| | | | +--v-b.userActivity#$userActivity
| | | | +--v-b.grow pageMode#$pageContents
| | | | | +--div.split-top border-list
| | | | | | +--div.pageInfoPane rem2-3 bar
| | | | | | | +--span.item
| | | | | | | | +--div.half half-label
| | | | | | | | +--time. time-ago half
| | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/9"]
| | | | | | | | +--span.textItem pre entity-title
| | | | | | | | +--img.item icon avatar
| | | | | | | +--span.item
| | | | | | | | +--div.half half-label
| | | | | | | | +--time. time-ago half
| | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/2"]
| | | | | | | | +--span.textItem pre entity-title
| | | | | | | | +--img.item icon avatar
| | | | | | | +--div. item rightAlign
| | | | | | | | +--div.buttonContainer item
| | | | | | | | | +--button. voteButton (submit)
| | | | | | | | | | +--div
| | | | | | | | | | +--div. voteCount
| | | | | | | | ...
| | | | | | +--div.markup-root pageContents
| | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?category/645"]
| | | | +--v-b.pre errorPage#$errorMessage
| | | | +--v-b.grow editorPreview
| | | | | +--div.split-top#$editorPreviewPane
| | | | | | +--div.markup-root#$editorPreview
| | | | +--v-b#$chatlogSearchResults
| | | | +--v-b.border-list
| | | | | +--div
| | | | | | +--div.gallery-inner
| | | | | | | +--div
| | | | | | | | +--div.image-box image-box-large fill
| | | | | | | | | +--img#$galleryImage
| | | | | | | +--canvas
| | | | | | +--div.gallery-title#$galleryTitle
| | | | | +--div.border-list-2#$homeCategories
| | | | +--v-b.memberPane
| | | | | +--div.border-list-2#$memberList
| | | | +--v-b#$activity
| | | | +--v-b
| | | | | +--textarea#$testTextarea (textarea)
| | | | | +--br
| | | | | +--div.buttonContainer
| | | | | | +--button#$testButton (submit)
| | | | | +--br
| | | | | +--div.pre#$testOut
| | | | +--v-b.bottomSpacer
| | | +--v-b.resize editorPreview#$editorPreviewResize
| | | +--v-b.grow#$editorTextareaPanel
| | | | +--div.editorTextarea fill
| | | | | +--textarea.fill#$editorTextarea (textarea)
| | | +--v-b.resize#$chatResize
| | | +--v-b.grow flex#$chatContainer
| | | | +--v-b.flex chatMode grow chatPane border-list#$chatPane
| | | | | +--div.bar rem2-3 userlist
| | | | | | +--span
| | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/9"]
| | | | | | | | +--img.item avatar
| | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/143"]
| | | | | | | | +--img.item avatar
| | | | | | +--div.buttonContainer rightAlign item loggedIn
| | | | | | | +--button (submit)
| | | | | +--scroll-outer.grow chatScroller
| | | | | | +--div.buttonContainer
| | | | | | | +--button (submit)
| | | | | | +--label
| | | | | | | +--input (checkbox)
| | | | | | +--scroll-inner
| | | | | | | +--message-block
| | | | | | | | +--time
| | | | | | | | +--img.item avatar
| | | | | | | | +--span. username-label
| | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/9"]
| | | | | | | | | | +--span.pre username
| | | | | | | | +--message-contents
| | | | | | | | | +--message-part.markup-root
| | | | | | | | | | +--a :["https://twitter.com/Perska_/status/1450063209839448067"] :["_blank"]
| | | | | | | | | ...
| | | | | | | ...
| | | | +--v-b.inputPane chatMode loggedIn flex-row
| | | | | +--div.buttonContainer showWhenEdit
| | | | | | +--button#$chatCancelEdit (submit)
| | | | | +--textarea-container.grow
| | | | | | +--textarea.chatTextarea#$chatTextarea (textarea)
| | | | | +--label.no-select
| | | | | | +--input#$chatMarkupSelect (checkbox)
| | +--sidebar-container.flex flex-sized#$sidebar
| | | +--div.buttonContainer closeSidebar
| | | | +--button#$closeSidebar (submit)
| | | +--div.userlist bar rem1-5
| | | | +--span#$sidebarUserList
| | | | +--div.buttonContainer item rightAlign loggedIn
| | | | | +--button#$hideGlobalStatusButton (submit)
| | | +--tab-list#$sidebarTabs
| | | | +--button#sidebar-tab-0 (submit)
| | | | ...
| | | +--div.flex-sized#$sidebarTop
| | | | +--sidebar-panel#$sidebarActivityPanel
| | | | | +--scroll-outer
| | | | | | +--scroll-inner.border-list-2#$sidebarActivity
| | | | | | | +--a. linkBar :["https://oboy.smilebasicsource.com/12/?page/937"]
| | | | | | | | +--div. ellipsis bar rem1-5
| | | | | | | | | +--span.item icon iconBg
| | | | | | | | | +--span.textItem pre entity-title
| | | | | | | | +--div. bar rem1-5
| | | | | | | | | +--activity-users.rightAlign
| | | | | | | | | | +--time. time-ago textItem
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/9"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/143"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/12"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/5410"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/829"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/14"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/5"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/26"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/10"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/31"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/8731"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | +--a. linkBar :["https://oboy.smilebasicsource.com/12/?page/3489"]
| | | | | | | | +--div. ellipsis bar rem1-5
| | | | | | | | | +--span.item icon iconBg
| | | | | | | | | +--span.textItem pre entity-title
| | | | | | | | +--div. bar rem1-5
| | | | | | | | | +--activity-users.rightAlign
| | | | | | | | | | +--time. time-ago textItem
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/9"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/12"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/26"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/5410"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/10"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/3"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/2"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | +--a. linkBar :["https://oboy.smilebasicsource.com/12/?page/4018"]
| | | | | | | | +--div. ellipsis bar rem1-5
| | | | | | | | | +--span.item icon iconBg
| | | | | | | | | +--span.textItem pre entity-title
| | | | | | | | +--div. bar rem1-5
| | | | | | | | | +--activity-users.rightAlign
| | | | | | | | | | +--time. time-ago textItem
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/9"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/26"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/10"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | +--a. linkBar :["https://oboy.smilebasicsource.com/12/?page/6303"]
| | | | | | | | +--div. ellipsis bar rem1-5
| | | | | | | | | +--span.item icon iconBg
| | | | | | | | | +--span.textItem pre entity-title
| | | | | | | | +--div. bar rem1-5
| | | | | | | | | +--activity-users.rightAlign
| | | | | | | | | | +--time. time-ago textItem
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/14"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/143"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/12"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/10"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | +--a. linkBar :["https://oboy.smilebasicsource.com/12/?page/2450"]
| | | | | | | | +--div. ellipsis bar rem1-5
| | | | | | | | | +--span.item icon iconBg
| | | | | | | | | +--span.textItem pre entity-title
| | | | | | | | +--div. bar rem1-5
| | | | | | | | | +--activity-users.rightAlign
| | | | | | | | | | +--time. time-ago textItem
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/143"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/829"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/26"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/10"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/9"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/31"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | +--a. linkBar :["https://oboy.smilebasicsource.com/12/?page/981"]
| | | | | | | | +--div. ellipsis bar rem1-5
| | | | | | | | | +--span.item icon iconBg
| | | | | | | | | +--span.textItem pre entity-title
| | | | | | | | +--div. bar rem1-5
| | | | | | | | | +--activity-users.rightAlign
| | | | | | | | | | +--time. time-ago textItem
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/829"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | +--a. linkBar :["https://oboy.smilebasicsource.com/12/?page/18610"]
| | | | | | | | +--div. ellipsis bar rem1-5
| | | | | | | | | +--span.item icon iconBg
| | | | | | | | | +--span.textItem pre entity-title
| | | | | | | | +--div. bar rem1-5
| | | | | | | | | +--activity-users.rightAlign
| | | | | | | | | | +--time. time-ago textItem
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/18606"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/12"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/143"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | +--a. linkBar :["https://oboy.smilebasicsource.com/12/?page/12942"]
| | | | | | | | +--div. ellipsis bar rem1-5
| | | | | | | | | +--span.item icon iconBg
| | | | | | | | | +--span.textItem pre entity-title
| | | | | | | | +--div. bar rem1-5
| | | | | | | | | +--activity-users.rightAlign
| | | | | | | | | | +--time. time-ago textItem
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/829"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/11789"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/0"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | +--a. linkBar :["https://oboy.smilebasicsource.com/12/?page/2231"]
| | | | | | | | +--div. ellipsis bar rem1-5
| | | | | | | | | +--span.item icon iconBg
| | | | | | | | | +--span.textItem pre entity-title
| | | | | | | | +--div. bar rem1-5
| | | | | | | | | +--activity-users.rightAlign
| | | | | | | | | | +--time. time-ago textItem
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/26"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | +--a. linkBar :["https://oboy.smilebasicsource.com/12/?page/14123"]
| | | | | | | | +--div. ellipsis bar rem1-5
| | | | | | | | | +--span.item icon iconBg
| | | | | | | | | +--span.textItem pre entity-title
| | | | | | | | +--div. bar rem1-5
| | | | | | | | | +--activity-users.rightAlign
| | | | | | | | | | +--time. time-ago textItem
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/9"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | +--a. linkBar :["https://oboy.smilebasicsource.com/12/?page/4545"]
| | | | | | | | +--div. ellipsis bar rem1-5
| | | | | | | | | +--span.item icon iconBg
| | | | | | | | | +--span.textItem pre entity-title
| | | | | | | | +--div. bar rem1-5
| | | | | | | | | +--activity-users.rightAlign
| | | | | | | | | | +--time. time-ago textItem
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/9"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/26"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/10"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | +--a. linkBar :["https://oboy.smilebasicsource.com/12/?page/4385"]
| | | | | | | | +--div. ellipsis bar rem1-5
| | | | | | | | | +--span.item icon iconBg
| | | | | | | | | +--span.textItem pre entity-title
| | | | | | | | +--div. bar rem1-5
| | | | | | | | | +--activity-users.rightAlign
| | | | | | | | | | +--time. time-ago textItem
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/26"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/9"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | +--a. linkBar :["https://oboy.smilebasicsource.com/12/?page/10297"]
| | | | | | | | +--div. ellipsis bar rem1-5
| | | | | | | | | +--span.item icon iconBg
| | | | | | | | | +--span.textItem pre entity-title
| | | | | | | | +--div. bar rem1-5
| | | | | | | | | +--activity-users.rightAlign
| | | | | | | | | | +--time. time-ago textItem
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/10"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/26"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/9"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | +--a. linkBar :["https://oboy.smilebasicsource.com/12/?page/4360"]
| | | | | | | | +--div. ellipsis bar rem1-5
| | | | | | | | | +--span.item icon iconBg
| | | | | | | | | +--span.textItem pre entity-title
| | | | | | | | +--div. bar rem1-5
| | | | | | | | | +--activity-users.rightAlign
| | | | | | | | | | +--time. time-ago textItem
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/5410"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/9"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | +--a. linkBar :["https://oboy.smilebasicsource.com/12/?page/2204"]
| | | | | | | | +--div. ellipsis bar rem1-5
| | | | | | | | | +--span.item icon iconBg
| | | | | | | | | +--span.textItem pre entity-title
| | | | | | | | +--div. bar rem1-5
| | | | | | | | | +--activity-users.rightAlign
| | | | | | | | | | +--time. time-ago textItem
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/26"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/9"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | +--a. linkBar :["https://oboy.smilebasicsource.com/12/?page/2389"]
| | | | | | | | +--div. ellipsis bar rem1-5
| | | | | | | | | +--span.item icon iconBg
| | | | | | | | | +--span.textItem pre entity-title
| | | | | | | | +--div. bar rem1-5
| | | | | | | | | +--activity-users.rightAlign
| | | | | | | | | | +--time. time-ago textItem
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/9"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/10"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | +--a. linkBar :["https://oboy.smilebasicsource.com/12/?page/2717"]
| | | | | | | | +--div. ellipsis bar rem1-5
| | | | | | | | | +--span.item icon iconBg
| | | | | | | | | +--span.textItem pre entity-title
| | | | | | | | +--div. bar rem1-5
| | | | | | | | | +--activity-users.rightAlign
| | | | | | | | | | +--time. time-ago textItem
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/9"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/829"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/11789"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | +--a. linkBar :["https://oboy.smilebasicsource.com/12/?page/42"]
| | | | | | | | +--div. ellipsis bar rem1-5
| | | | | | | | | +--span.item icon iconBg
| | | | | | | | | +--span.textItem pre entity-title
| | | | | | | | +--div. bar rem1-5
| | | | | | | | | +--activity-users.rightAlign
| | | | | | | | | | +--time. time-ago textItem
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/9"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | +--a. linkBar :["https://oboy.smilebasicsource.com/12/?page/13031"]
| | | | | | | | +--div. ellipsis bar rem1-5
| | | | | | | | | +--span.item icon iconBg
| | | | | | | | | +--span.textItem pre entity-title
| | | | | | | | +--div. bar rem1-5
| | | | | | | | | +--activity-users.rightAlign
| | | | | | | | | | +--time. time-ago textItem
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/9"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | +--a. linkBar :["https://oboy.smilebasicsource.com/12/?page/2202"]
| | | | | | | | +--div. ellipsis bar rem1-5
| | | | | | | | | +--span.item icon iconBg
| | | | | | | | | +--span.textItem pre entity-title
| | | | | | | | +--div. bar rem1-5
| | | | | | | | | +--activity-users.rightAlign
| | | | | | | | | | +--time. time-ago textItem
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/143"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/9"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | +--a. linkBar :["https://oboy.smilebasicsource.com/12/?page/7143"]
| | | | | | | | +--div. ellipsis bar rem1-5
| | | | | | | | | +--span.item icon iconBg
| | | | | | | | | +--span.textItem pre entity-title
| | | | | | | | +--div. bar rem1-5
| | | | | | | | | +--activity-users.rightAlign
| | | | | | | | | | +--time. time-ago textItem
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/9"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | +--a. linkBar :["https://oboy.smilebasicsource.com/12/?page/2208"]
| | | | | | | | +--div. ellipsis bar rem1-5
| | | | | | | | | +--span.item icon iconBg
| | | | | | | | | +--span.textItem pre entity-title
| | | | | | | | +--div. bar rem1-5
| | | | | | | | | +--activity-users.rightAlign
| | | | | | | | | | +--time. time-ago textItem
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/9"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/334"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/12"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/26"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/10"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | +--a. linkBar :["https://oboy.smilebasicsource.com/12/?page/7442"]
| | | | | | | | +--div. ellipsis bar rem1-5
| | | | | | | | | +--span.item icon iconBg
| | | | | | | | | +--span.textItem pre entity-title
| | | | | | | | +--div. bar rem1-5
| | | | | | | | | +--activity-users.rightAlign
| | | | | | | | | | +--time. time-ago textItem
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/12"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/9"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | +--a. linkBar :["https://oboy.smilebasicsource.com/12/?page/2209"]
| | | | | | | | +--div. ellipsis bar rem1-5
| | | | | | | | | +--span.item icon iconBg
| | | | | | | | | +--span.textItem pre entity-title
| | | | | | | | +--div. bar rem1-5
| | | | | | | | | +--activity-users.rightAlign
| | | | | | | | | | +--time. time-ago textItem
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/6"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/10"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/3"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/9"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | +--a. linkBar :["https://oboy.smilebasicsource.com/12/?page/7573"]
| | | | | | | | +--div. ellipsis bar rem1-5
| | | | | | | | | +--span.item icon iconBg
| | | | | | | | | +--span.textItem pre entity-title
| | | | | | | | +--div. bar rem1-5
| | | | | | | | | +--activity-users.rightAlign
| | | | | | | | | | +--time. time-ago textItem
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/9"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/26"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | +--a. linkBar :["https://oboy.smilebasicsource.com/12/?page/6795"]
| | | | | | | | +--div. ellipsis bar rem1-5
| | | | | | | | | +--span.item icon iconBg
| | | | | | | | | +--span.textItem pre entity-title
| | | | | | | | +--div. bar rem1-5
| | | | | | | | | +--activity-users.rightAlign
| | | | | | | | | | +--time. time-ago textItem
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/9"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | +--a. linkBar :["https://oboy.smilebasicsource.com/12/?page/5501"]
| | | | | | | | +--div. ellipsis bar rem1-5
| | | | | | | | | +--span.item icon iconBg
| | | | | | | | | +--span.textItem pre entity-title
| | | | | | | | +--div. bar rem1-5
| | | | | | | | | +--activity-users.rightAlign
| | | | | | | | | | +--time. time-ago textItem
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/5410"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | +--a. linkBar :["https://oboy.smilebasicsource.com/12/?page/7574"]
| | | | | | | | +--div. ellipsis bar rem1-5
| | | | | | | | | +--span.item icon iconBg
| | | | | | | | | +--span.textItem pre entity-title
| | | | | | | | +--div. bar rem1-5
| | | | | | | | | +--activity-users.rightAlign
| | | | | | | | | | +--time. time-ago textItem
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/9"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | +--a. linkBar :["https://oboy.smilebasicsource.com/12/?page/2643"]
| | | | | | | | +--div. ellipsis bar rem1-5
| | | | | | | | | +--span.item icon iconBg
| | | | | | | | | +--span.textItem pre entity-title
| | | | | | | | +--div. bar rem1-5
| | | | | | | | | +--activity-users.rightAlign
| | | | | | | | | | +--time. time-ago textItem
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/9"]
| | | | | | | | | | | +--img.item icon avatar
| | | | | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/12"]
| | | | | | | | | | | +--img.item icon avatar
| | | | ...
| | | | +--sidebar-panel.flex#$sidebarFilePanel
| | | | | +--div.bar rem1-5
| | | | | | +--input.sidebarUploadingHide item#$imageUpload (file)
| | | | | | +--div.buttonContainer sidebarUploadingFile item
| | | | | | | +--button#$fileCancel (submit)
| | | | | | +--div.buttonContainer sidebarUploadingFile rightAlign item
| | | | | | | +--button#$fileUpload (submit)
| | | | | | +--input.item sidebarUploadedFile#$fileURL (text)
| | | | | | +--div.buttonContainer item sidebarUploadedFile
| | | | | | | +--button#$fileDone (submit)
| | | | | +--div.bar sidebarUploadedFile#$fileUploadNameOut
| | | | | +--label.sidebarUploadingFile bar
| | | | | | +--input.item#$fileUploadName (text)
| | | | | ...
| | | | | +--div.image-box grow
| | | | | | +--img#$fileView
| | | | | +--a :["https://oboy.smilebasicsource.com/12/?images"]
| | | | +--sidebar-panel#$sidebarUserPanel
| | | | | +--div.buttonContainer
| | | | | | +--button (submit)
| | | | | +--div.loggedOut
| | | | | | +--div.registerBox
| | | | | | | +--h2
| | | | | | | +--form#$loginForm
| | | | | | | | +--input (text)
| | | | | | | | +--br
| | | | | | | | +--input (password)
| | | | | | | | +--br
| | | | | | | | +--div.buttonContainer
| | | | | | | | | +--button (submit)
| | | | | | | +--div#$loginError
| | | | | | ...
| | | | | +--div.loggedIn border-list
| | | | | | +--div.registerBox
| | | | | | | +--div.buttonContainer
| | | | | | | | +--button#$logOut (submit)
| | | | | | | +--br
| | | | | | ...
| | | +--div.resize#$sidebarResize
| | | +--div.grow#$sidebarBottom
| | | | +--scroll-outer
| | | | | +--scroll-inner.border-list#$sidebarScroller
| | | | | | +--div. bar rem1-5 sidebarComment ellipsis
| | | | | | | +--a :["https://oboy.smilebasicsource.com/12/?user/9"]
| | | | | | | | +--img.item icon avatar
| | | | | | | | +--span.textItem pre entity-title
| | | | | | ...
debugger eval code:65:9
var results = new Array();
results.push(document.body.parentNode.nodeName);
function traverse(node, prefix) {
node = writeNode(node, prefix);
if (node) {
node = node.firstChild;
prefix += '| '
while (node) {
traverse(node, prefix)
node = node.nextSibling;
}
}
}
function lastSibling(prefix) {
for (var i = results.length - 1; i > 0; i--) {
if (results[i].substring(0, prefix.length) != prefix)
return - 1
else if (results[i].substring(prefix.length, prefix.length + 1) == '|'
|| results[i].substring(prefix.length, prefix.length + 1) == '.')
continue
else return i
}
return - 1
}
function writeNode(node, prefix) {
if (!'!#text!#comment!SCRIPT!STYLE!'.includes('!'+node.nodeName+'!')) {
var descriptive = node.nodeName.toLowerCase()
if (node.className)
descriptive += '.' + node.className
if (node.id)
descriptive += '#' + node.id
if (node.type)
descriptive += ' (' + node.type + ')'
if (node.href)
descriptive += ' :["' + node.href + '"]'
if (node.target)
descriptive += ' :["' + node.target + '"]'
//abbreviate repetition
var similarNodeIndex = lastSibling(prefix)
if (similarNodeIndex >= 0) {
//trim IDs (usually) to avoid enumerated values
if (results[similarNodeIndex].indexOf('#') > - 1) {
var shortPrev = results[similarNodeIndex].substring(0, results[similarNodeIndex].lastIndexOf('#'))
var shortCurrent = (prefix + '+--' + descriptive).substring(0, (prefix + '+--' + descriptive).lastIndexOf('#'))
} else {
var shortPrev = results[similarNodeIndex]
var shortCurrent = (prefix + '+--' + descriptive)
}
//if this element is repetitive, add ellipsis at the current level, unless we have one
if (shortPrev == shortCurrent) {
if (results[results.length - 1] != prefix + '...')
results.push(prefix + '...')
return null //do not iterate children
}
}
results.push(prefix + '+--' + descriptive)
}
return node
}
traverse(document.body, '');
console.log(results.join('\n'))
@12Me21
Copy link

12Me21 commented Jun 3, 2017

I don't understand this isn't even like a tree what
like see http://kland.smilebasicsource.com/i/mhnft.png
do you not know what tree is?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment