Remove pixfuture ads because they don't pay well
This commit is contained in:
@@ -26,7 +26,8 @@ onMount(() => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (Math.floor(Math.random() * 5)) {
|
let now = new Date().getTime()
|
||||||
|
switch (now % 4) {
|
||||||
case 0:
|
case 0:
|
||||||
set_ad_type("brave")
|
set_ad_type("brave")
|
||||||
break
|
break
|
||||||
@@ -37,9 +38,6 @@ onMount(() => {
|
|||||||
set_ad_type("ads.plus")
|
set_ad_type("ads.plus")
|
||||||
break
|
break
|
||||||
case 3:
|
case 3:
|
||||||
set_ad_type("pixfuture")
|
|
||||||
break
|
|
||||||
case 4:
|
|
||||||
set_ad_type("adaround")
|
set_ad_type("adaround")
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@@ -46,17 +46,14 @@ onMount(async () => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (Math.floor(Math.random() * 4)) {
|
switch (now % 3) {
|
||||||
case 0:
|
case 0:
|
||||||
set_ad_type("aads2")
|
set_ad_type("aads2")
|
||||||
break
|
break
|
||||||
case 1:
|
case 1:
|
||||||
set_ad_type("pixfuture")
|
|
||||||
break
|
|
||||||
case 2:
|
|
||||||
set_ad_type("ads.plus")
|
set_ad_type("ads.plus")
|
||||||
break
|
break
|
||||||
case 3:
|
case 2:
|
||||||
set_ad_type("adaround")
|
set_ad_type("adaround")
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@@ -154,7 +154,7 @@ const reload = async () => {
|
|||||||
loading = false
|
loading = false
|
||||||
}
|
}
|
||||||
|
|
||||||
const open_list = async l => {
|
const open_list = l => {
|
||||||
l.download_href = window.api_endpoint+"/list/"+l.id+"/zip"
|
l.download_href = window.api_endpoint+"/list/"+l.id+"/zip"
|
||||||
l.info_href = window.api_endpoint+"/list/"+l.id
|
l.info_href = window.api_endpoint+"/list/"+l.id
|
||||||
l.files.forEach(f => {
|
l.files.forEach(f => {
|
||||||
@@ -172,10 +172,9 @@ const open_list = async l => {
|
|||||||
let hashID = parseInt(matches ? matches[1] : null)
|
let hashID = parseInt(matches ? matches[1] : null)
|
||||||
if (Number.isInteger(hashID)) {
|
if (Number.isInteger(hashID)) {
|
||||||
// The URL contains an item number. Navigate to that item
|
// The URL contains an item number. Navigate to that item
|
||||||
view = "file"
|
open_file_index(hashID)
|
||||||
open_file_index(parseInt(hashID))
|
} else if (view !== "gallery") {
|
||||||
} else {
|
toggle_gallery()
|
||||||
view = "gallery"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const open_file_index = async index => {
|
const open_file_index = async index => {
|
||||||
@@ -188,12 +187,13 @@ const open_file_index = async index => {
|
|||||||
|
|
||||||
file_set_href(list.files[index])
|
file_set_href(list.files[index])
|
||||||
file = list.files[index]
|
file = list.files[index]
|
||||||
view = "file"
|
|
||||||
|
if (view !== "file") {
|
||||||
|
view = "file"
|
||||||
|
await tick() // Wait for the ListNavigator to render
|
||||||
|
}
|
||||||
|
|
||||||
if (is_list) {
|
if (is_list) {
|
||||||
// Wait for the ListNavigator to render
|
|
||||||
await tick()
|
|
||||||
|
|
||||||
// Update the URL
|
// Update the URL
|
||||||
location.replace("#item=" + index)
|
location.replace("#item=" + index)
|
||||||
list_navigator.set_item(index)
|
list_navigator.set_item(index)
|
||||||
|
@@ -82,7 +82,7 @@ const select_item_event = idx => {
|
|||||||
<div class="list_item file_button"
|
<div class="list_item file_button"
|
||||||
class:file_button_selected={file.selected}
|
class:file_button_selected={file.selected}
|
||||||
on:click={() => { select_item_event(index) }}>
|
on:click={() => { select_item_event(index) }}>
|
||||||
<img src={file.icon_href+"?width=48&height=48"} alt={file.name} class="list_item_thumbnail" />
|
<img src={file.icon_href+"?width=48&height=48"} alt={file.name} class="list_item_thumbnail" loading="lazy"/>
|
||||||
{file.name}
|
{file.name}
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
|
Reference in New Issue
Block a user