Browse Source

Don't preload cover images

spaghetti 7 years ago
parent
commit
a68f182264
2 changed files with 6 additions and 1 deletions
  1. 2
    0
      static/functions/browse.js
  2. 4
    1
      static/functions/global.js

+ 2
- 0
static/functions/browse.js View File

@@ -280,9 +280,11 @@ $(function() {
280 280
     var els = $('#torrent_table.grouping .colhead td:first-child(), #torrent_table.grouping .colhead_dark td:first-child(), #torrent_table.grouping .torrent td:first-child()')
281 281
     for (var i = 0; i < els.length; i++) { els[i].style.display = 'none' }
282 282
   }
283
+/*
283 284
   //Preload first result's cover
284 285
   if ($('#torrent_table').length > 0) {
285 286
     var a = $('a[data-cover]')[0]
286 287
     if (a) preload(a.attributes['data-cover'].value)
287 288
   }
289
+ */
288 290
 })

+ 4
- 1
static/functions/global.js View File

@@ -311,6 +311,7 @@ function getCover(event) {
311 311
   $('#coverCont img')[0].src = image?image:'/static/common/noartwork/nocover.png'
312 312
   coverCont.className = (event.clientX > (window.innerWidth/2)) ? 'left' : 'right'
313 313
   coverCont.style.display = 'block'
314
+/*
314 315
   //Preload next image
315 316
   if ($('.torrent_table, .request_table').length > 0) {
316 317
     var as = $('[data-cover]')
@@ -318,6 +319,7 @@ function getCover(event) {
318 319
     preload((as[as.toArray().indexOf(a)+1]||as[0]).attributes['data-cover'].value)
319 320
     preload((as[as.toArray().indexOf(a)-1]||as[0]).attributes['data-cover'].value)
320 321
   }
322
+*/
321 323
 }
322 324
 function ungetCover(event) {
323 325
   $('#coverCont img').remove()
@@ -331,11 +333,12 @@ if (typeof NodeList.prototype.forEach !== 'function') {
331 333
 }
332 334
 
333 335
 $(function() {
336
+/*
334 337
   if ($('.request_table').length > 0) {
335 338
     var a = $('[data-cover]')[0]
336 339
     if (a) preload(a.attributes['data-cover'].value)
337 340
   }
338
-
341
+*/
339 342
   document.querySelectorAll('[data-toggle-target]').forEach(function(el) {
340 343
     el.addEventListener('click', function(event) {
341 344
       $(el.attributes['data-toggle-target'].value).gtoggle()

Loading…
Cancel
Save