Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  1. function ctstv() {
  2. const state = APP.store.getState();
  3. const { clientHeight, clientWidth } = state['features/base/responsive-ui'];
  4. clog(clientHeight, clientWidth)
  5. // clog(
  6. var wh = glob_dev_fns.calculateThumbnailSizeForTileView_dev({
  7. columns:1,
  8. visibleRows:1,
  9. clientWidth,
  10. clientHeight,
  11. TILE_ASPECT_RATIO:TILE_ASPECT_RATIO ,
  12. // sideMargins=0,
  13. topBottomPadding:100,
  14. })
  15. // )
  16. var width =wh.width
  17. var height =wh.height
  18. var w4 = width/4
  19. var h4 = height/4
  20. var w34 = w4 * 3
  21. var h34 = h4 * 3
  22. clog({
  23. TILE_ASPECT_RATIO,
  24. tm:TILE_ASPECT_RATIO * (5/6),
  25. tm2:(w4 * 6)/(h4 * 5),
  26. // tm22:(w4 * 6)/(h4 * 5),
  27. tm3:TILE_ASPECT_RATIO * (6/5),
  28. })
  29. // $(".ic4").css({
  30. $(".a1").css({
  31. height:h34,
  32. width:w34,
  33. top:h4,
  34. left:w4,
  35. // height:wh.height,
  36. // width:wh.width,
  37. })
  38. $(".ic5").css({
  39. height:height,
  40. width:width,
  41. // top:h4,
  42. // left:w4,
  43. // height:wh.height,
  44. // width:wh.width,
  45. })
  46. }
  47. dflt_css_proto = {
  48. 'padding-top': '',
  49. "min-height": ``,
  50. "min-width": ``,
  51. width: ``,
  52. height: ``,
  53. top: ``,
  54. left: ``,
  55. bottom: ``,
  56. right: ``,
  57. // right: ``,
  58. // right: ``,
  59. }
  60. function resize_thumbs_proto(thumbs,css_arg){
  61. let css
  62. if (Array.isArray(css_arg)){
  63. css = Object.assign({},dflt_css_proto,...css_arg)
  64. } else {
  65. css = Object.assign({},dflt_css_proto,css_arg)
  66. }
  67. var k,v
  68. for ([k,v] of Object.entries(css)){
  69. // Number(v) ? computed_css[k] = v + "px" : 0
  70. }
  71. if (typeof(css.data) == "object"){
  72. try{
  73. Object.assign($(thumbs)[0].dataset,css.data)
  74. // clog("dataset ....")
  75. } catch(err) {
  76. clog("dataset err",err)
  77. }
  78. }
  79. css["--vdim"] = `"${css.width} x ${css.height}"`
  80. // clog("RTHUMBS")
  81. $(thumbs).css(css)
  82. }
  83. function get_avail_width(){
  84. const TILE_ASPECT_RATIO = 16/9
  85. const state = APP.store.getState();
  86. var { clientHeight, clientWidth } = state['features/base/responsive-ui'];
  87. var avail_width =clientWidth
  88. var avail_height =clientHeight - 100
  89. resize_thumbs_proto($(".a1"),{
  90. width:clientWidth,
  91. height:clientHeight,
  92. "--vtext":`"window"`
  93. })
  94. resize_thumbs_proto($(".a2"),{
  95. width:avail_width,
  96. height:avail_height,
  97. "--vtext":`"avail"`
  98. })
  99. var wh = glob_dev_fns.calculateThumbnailSizeForTileView_dev({
  100. columns:1,
  101. visibleRows:1,
  102. clientWidth:avail_width,
  103. clientHeight:avail_height,
  104. TILE_ASPECT_RATIO:TILE_ASPECT_RATIO ,
  105. verticalMargin:0,
  106. // sideMargins=0,
  107. // topBottomPadding:100,
  108. })
  109. clog(wh)
  110. resize_thumbs_proto($(".a3"),{
  111. width:wh.width,
  112. height:wh.height,
  113. "--vtext":`"tile"`
  114. })
  115. var width =wh.width
  116. var height =wh.height
  117. var w4 = width/4
  118. var h4 = height/4
  119. var w34 = w4 * 3
  120. var h34 = h4 * 3
  121. resize_thumbs_proto($(".a4z"),{
  122. width:w4,
  123. height:h4,
  124. "--vtext":`"t4"`
  125. })
  126. resize_thumbs_proto($(".a5"),{
  127. width:Math.round(w4),
  128. height:Math.round(h4),
  129. "--vtext":`"t4"`
  130. })
  131. resize_thumbs_proto($(".a6"),{
  132. width:Math.round(w34),
  133. height:Math.round(h34),
  134. top:h4,
  135. left:w4,
  136. // top:h4,
  137. "--vtext":`"t34"`
  138. })
  139. var w =16
  140. var h =9
  141. const TILE_ASPECT_RATIO2 = (w * 6) / (h * 5)
  142. const TILE_ASPECT_RATIO3 = (w * 6) / (h * 4)
  143. resize_thumbs_proto($(".a7"),{
  144. width:Math.round(w4),
  145. height:Math.round(h4),
  146. // top:h4,
  147. left:w34 + w4,
  148. // top:h4,
  149. "--vtext":`"t4"`
  150. })
  151. var w =16
  152. var h =9
  153. var wh2 = glob_dev_fns.calculateThumbnailSizeForTileView_dev({
  154. columns:1,
  155. visibleRows:1,
  156. clientWidth:avail_width,
  157. clientHeight:avail_height,
  158. TILE_ASPECT_RATIO:TILE_ASPECT_RATIO3 ,
  159. verticalMargin:0,
  160. // sideMargins=0,
  161. // topBottomPadding:100,
  162. })
  163. resize_thumbs_proto($(".b1"),{
  164. width:wh2.width,
  165. height:wh2.height,
  166. "--vtext":`"tile_container"`
  167. })
  168. width =wh2.width
  169. height =wh2.height
  170. w6 = width/6
  171. h6 = w6 / TILE_ASPECT_RATIO
  172. // h4 = height/4
  173. w36 = w6 * 3
  174. h36 = h6 * 3
  175. w46 = w6 * 4
  176. h46 = h6 * 4
  177. resize_thumbs_proto($(".b2"),{
  178. width:w6,
  179. height:h6,
  180. "--vtext":`"t6"`
  181. })
  182. resize_thumbs_proto($(".b2"),{
  183. width:w6,
  184. height:h6,
  185. "--vtext":`"t6"`
  186. })
  187. resize_thumbs_proto($(".b3"),{
  188. width:Math.round(w36),
  189. height:Math.round(h36),
  190. width:Math.round(w46),
  191. height:Math.round(h46),
  192. left:w6,
  193. top:h6,
  194. "--vtext":`"t4"`
  195. })
  196. resize_thumbs_proto($(".at"))
  197. w = 1000
  198. h = w / TILE_ASPECT_RATIO
  199. resize_thumbs_proto($(".b1"),{
  200. width:Math.round(w),
  201. height:Math.round(h),
  202. "--vtext":`"TILE_ASPECT_RATIO"`
  203. })
  204. h = w / TILE_ASPECT_RATIO2
  205. resize_thumbs_proto($(".b2"),{
  206. width:Math.round(w),
  207. height:Math.round(h),
  208. "--vtext":`"TILE_ASPECT_RATIO2"`
  209. })
  210. h = w / TILE_ASPECT_RATIO3
  211. resize_thumbs_proto($(".b3"),{
  212. width:Math.round(w),
  213. height:Math.round(h),
  214. "--vtext":`"TILE_ASPECT_RATIO3"`
  215. })
  216. w6 = w/6
  217. h6 = w6 / (16/9)
  218. h = w / TILE_ASPECT_RATIO3
  219. resize_thumbs_proto($(".a1"),{
  220. width:Math.round(w6),
  221. height:Math.round(h6),
  222. "--vtext":`"TILE_ASPECT_RATIO3"`
  223. })
  224. resize_thumbs_proto($(".a2"),{
  225. width:Math.round(w6),
  226. height:Math.round(h6),
  227. top:375,
  228. "--vtext":`"TILE_ASPECT_RATIO3"`
  229. })
  230. w_ = w6
  231. resize_thumbs_proto($(".a3"),{
  232. width:Math.round(w6 * 3),
  233. height:Math.round(h6 * 3),
  234. top:h6,
  235. left:w6,
  236. "--vtext":`"TILE_ASPECT_RATIO3"`
  237. })
  238. resize_thumbs_proto($(".a4"),{
  239. width:Math.round(w6),
  240. height:Math.round(h6),
  241. top:h6 * 2,
  242. "--vtext":`"TILE_ASPECT_RATIO3"`
  243. })
  244. resize_thumbs_proto($(".a5"),{
  245. width:Math.round(w6),
  246. height:Math.round(h6),
  247. // top:h6 * 2,
  248. left:w6 * 2,
  249. "--vtext":`"TILE_ASPECT_RATIO3"`
  250. })
  251. return {h:clientHeight - 100,clientHeight,clientWidth}
  252. }
  253. function init_api6(){
  254. saftly_remove(".plugin_top")
  255. // return
  256. // $(".plugin_top").remove()
  257. var n
  258. n = `<span class="plugin_top pseudo_vid small_vid "><div class="m2 xbox2">ABC</div></span>`
  259. html_hooks.create_video_tile(n.repeat(20))
  260. n = `<span class="plugin_top pseudo_vid small_vid "><div class="m3 xbox2">ABC</div></span>`
  261. var arr = []
  262. // arr[]
  263. /*
  264. html_hooks.create_video_tile(n)
  265. html_hooks.create_video_tile(n)
  266. html_hooks.create_video_tile(n)
  267. html_hooks.create_video_tile(n)
  268. html_hooks.create_video_tile(n)
  269. html_hooks.create_video_tile(n)
  270. if (amimod()){
  271. html_hooks.create_video_tile(n)
  272. html_hooks.create_video_tile(n)
  273. html_hooks.create_video_tile(n)
  274. html_hooks.create_video_tile(n)
  275. html_hooks.create_video_tile(n)
  276. html_hooks.create_video_tile(n)
  277. }
  278. */
  279. // n = `<span class="plugin_top"><div class="m xbox">ABC</div></span>`
  280. n = `<span class="plugin_top"><div class="m xbox">ABC</div></span>`
  281. // html_hooks.create_vid_toptoolbar_hook(n)
  282. html_hooks.create_vid_toptoolbar_hook_after(n)
  283. n = `<span class="plugin_top"><div class="m xbox">ABC</div></span>`
  284. html_hooks.create_top_toolbox_hook(n)
  285. n = `<span class="plugin_top"><div class="m xbox">ABC</div></span>`
  286. html_hooks.create_bottom_toolbox_hook(n)
  287. // n = `<span class="plugin_top abs"><div class="dev_filmstrip">ABC</div></span>`
  288. n = `<span class="plugin_top abs"><div class="dev_filmstrip">ABC</div></span>`
  289. n= mod_templates.find(".filmstrip_template")[0].outerHTML
  290. // html_hooks.create_new_filmstrip(n)
  291. n = `<span class="plugin_top pseudo_vid small_vid "><div class="m4 xbox3">ABC</div></span>`
  292. n= mod_templates.find("#vspace_filmstrip_template")[0].outerHTML
  293. // n= mod_templates.find("#vspace_filmstrip_proto_template")[0].outerHTML
  294. // vspace
  295. add_node(n,`.vspace`,"append")
  296. if (window.mod_sort){
  297. mod_sort()
  298. }
  299. try {
  300. dispatch_resize()
  301. } catch {
  302. }
  303. }
  304. if (window.saftly_remove){
  305. init_api6()
  306. // get_avail_width()
  307. // clog("REZIE PROTO READY")
  308. }
  309. // clog("REZIE PROTO LOAD")
  310. // ctstv()