MCPcopy
hub / github.com/liriliri/eruda / _initTpl

Method _initTpl

src/Resources/Storage.js:108–140  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

106 }
107 }
108 _initTpl() {
109 const $container = this._$container
110 const type = this._type
111
112 $container.html(
113 c(`<h2 class="title">
114 ${type === 'local' ? 'Local' : 'Session'} Storage
115 <div class="btn refresh-storage">
116 <span class="icon icon-refresh"></span>
117 </div>
118 <div class="btn show-detail btn-disabled">
119 <span class="icon icon-eye"></span>
120 </div>
121 <div class="btn copy-storage btn-disabled">
122 <span class="icon icon-copy"></span>
123 </div>
124 <div class="btn delete-storage btn-disabled">
125 <span class="icon icon-delete"></span>
126 </div>
127 <div class="btn clear-storage">
128 <span class="icon icon-clear"></span>
129 </div>
130 <div class="btn filter">
131 <span class="icon icon-filter"></span>
132 </div>
133 <div class="btn filter-text"></div>
134 </h2>
135 <div class="data-grid"></div>`)
136 )
137
138 this._$dataGrid = $container.find(c('.data-grid'))
139 this._$filterText = $container.find(c('.filter-text'))
140 }
141 _getVal(key) {
142 return this._type === 'local'
143 ? localStorage.getItem(key)

Callers 1

constructorMethod · 0.95

Calls 1

htmlMethod · 0.80

Tested by

no test coverage detected