Skip to content

Commit

Permalink
background sync
Browse files Browse the repository at this point in the history
  • Loading branch information
strukturart committed Mar 7, 2023
1 parent e0ce6f8 commit e6b6faa
Show file tree
Hide file tree
Showing 16 changed files with 1,443 additions and 425 deletions.
464 changes: 358 additions & 106 deletions application/app.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions application/assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,12 @@ div#settings div.input-parent {
padding: 10px 10px 20px 10px;
}

div#settings div#last-update {
font-size: 0.8rem;
padding: 10px;
margin: 10px 0 10px 0;
}

div#settings div.input-parent:focus {
padding: 10px 10px 20px 10px;

Expand Down
12 changes: 7 additions & 5 deletions application/assets/js/audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,11 @@ function startVolumeManager() {
};
session.open("websocket", "localhost", "secrettoken", sessionstate, true);
}
if ("b2g" in navigator) setTimeout(startVolumeManager, 5000);

setTimeout(startVolumeManager, 5000);

export let volume_control = function (t) {
export let volume_control = function () {
//KaiOS 3.x
if (navigator.b2g.audioChannelManager && navigator.volumeManager) {
if ("b2g" in navigator) {
try {
navigator.volumeManager.requestVolumeShow();
let f = status.window_status;
Expand All @@ -125,10 +124,13 @@ export let volume_control = function (t) {
}, 3000);
} catch (e) {}
}

//KaiOS 2.x
try {
navigator.volumeManager.requestShow();
} catch (e) {}
} catch (e) {
alert("jj");
}
};

player.onloadedmetadata = function () {
Expand Down
2 changes: 1 addition & 1 deletion application/assets/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export let setting = {
interval:
localStorage.getItem("interval") != null
? localStorage.getItem("interval")
: 0,
: "never",
source_local:
localStorage.getItem("source_local") != null
? localStorage.getItem("source_local")
Expand Down
21 changes: 7 additions & 14 deletions application/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ <h2>Options</h2>
</div>

<div data-function="reload" class="item flex width-100" tabindex="5">
<span class="text">reload content</span><span class="middle"></span
<span class="text">update content</span><span class="middle"></span
><span class="key">0</span>
</div>

Expand All @@ -151,7 +151,7 @@ <h2>Options</h2>
class="item flex width-100"
tabindex="6"
>
<span class="text">episodes downlad</span><span class="middle"></span
<span class="text">download manager</span><span class="middle"></span
><span class="key"></span>
</div>

Expand Down Expand Up @@ -199,23 +199,20 @@ <h2 class="item" tabindex="0">Icons & Shortcuts</h2>
</ul>
<h2>Settings</h2>
<div class="item input-parent">
<label for="time"
>The loaded articles are temporarily saved on your device. New
content can be reloaded when the app is restarted. how many minutes
should the content be cached?</label
>
<label for="time">automatic download of new content</label>
<select id="time" class="select-box">
<option value="5">5min</option>
<option value="10">10min</option>
<option value="never">on start</option>
<option value="20">20min</option>
<option value="30">30min</option>
<option value="40">40min</option>
<option value="60">1h</option>
<option value="120">2h</option>
<option value="360">6h</option>
<option value="1440">24h</option>
</select>
</div>

<div id="last-update"></div>

<h2>where should the list of the rss feed be loaded from?</h2>

<div class="item input-parent" tabindex="2">
Expand All @@ -234,10 +231,6 @@ <h2>where should the list of the rss feed be loaded from?</h2>
/>
</div>

<button class="item set-download-amount">
How many episodes should be loaded ?
</button>

<div class="item input-parent">
<label for="sleep-mode"
><strong
Expand Down
105 changes: 56 additions & 49 deletions application/manifest.webapp
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
{
"version": "1.5.0",
"name": "feedolin",
"description": "Feedolin is an RSS / Atom reader and podcast player. It is intended for users who already use an rss reader client and want to read their feeds on a kaios device. the list of subscribed websites / podcasts is managed locally or online in an opml file.",
"launch_path": "/index.html",
"type": "privileged",
"fullscreen": "true",
"version": "1.5.0",
"name": "feedolin",
"description": "Feedolin is an RSS / Atom reader and podcast player. It is intended for users who already use an rss reader client and want to read their feeds on a kaios device. the list of subscribed websites / podcasts is managed locally or online in an opml file.",
"launch_path": "/index.html",
"type": "privileged",
"fullscreen": "true",

"icons": {
"56": "/assets/icons/icon-56-56.png",
"112": "/assets/icons/icon-112-112.png"
},

"developer":
{
"name": "strukturart",
"url": "https://strukturart.com"
},
"icons": {
"56": "/assets/icons/icon-56-56.png",
"112": "/assets/icons/icon-112-112.png"
},

"developer": {
"name": "strukturart",
"url": "https://strukturart.com"
},

"dependencies": {
"ads-sdk": "1.5.8"
Expand All @@ -31,44 +29,53 @@
},
"default_locale": "en-US",

"messages": [
{
"alarm": "/index.html"
},
{
"notification": "/index.html"
},
{ "serviceworker-notification": "/index.html" },
{ "activity": "/index.html" }
],

"serviceworker": {
"script_url": "sw.js"
},

"permissions":
{
"mobiledata": {},
"wifidata": {},
"calllog": {},

"device-storage:sdcard": {
"description": "Read/Write from/to sd-card",
"access": "readwrite"
},

"video-capture": {
"description": "Reading Codes using the Camera"
},

"permissions": {
"mobiledata": {},
"wifidata": {},
"calllog": {},

"audio-channel-normal" : {
"description" : "Needed to play this app's audio content on the normal channel"
},
"audio-channel-content" : {
"description" : "Needed to play this app's audio content on the content channel"
},
"desktop-notification" : {
"description" : "Needed to fire system notifications"
},
"device-storage:sdcard": {
"description": "Read/Write from/to sd-card",
"access": "readwrite"
},

"volumemanager":{},
"browser": {},
"spatialnavigation-app-manage": {
"navigator.spatialNavigationEnabled": false
},
"video-capture": {
"description": "Reading Codes using the Camera"
},

"systemXHR": {
"description": "Required to load remote content"
}
"audio-channel-content": {
"description": "Needed to play this app's audio content on the content channel"
},
"desktop-notification": {
"description": "Needed to fire system notifications"
},

}
"volumemanager": {},
"browser": {},
"spatialnavigation-app-manage": {
"navigator.spatialNavigationEnabled": false
},

"systemXHR": {
"description": "Required to load remote content"
},
"alarms": {
"description": "Required to schedule alarms"
}
}
}
Empty file added application/sw.js
Empty file.
Loading

0 comments on commit e6b6faa

Please sign in to comment.