From 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d Mon Sep 17 00:00:00 2001 From: Jef Date: Tue, 24 Sep 2024 14:54:57 +0200 Subject: Initial community commit --- .../Library/ml_online/resources/iconAol.png | Bin 0 -> 253 bytes .../Library/ml_online/resources/iconAolGames.png | Bin 0 -> 206 bytes .../Library/ml_online/resources/iconDefault.png | Bin 0 -> 245 bytes .../Library/ml_online/resources/iconIn2Tv.png | Bin 0 -> 247 bytes .../Library/ml_online/resources/iconMusicNow.png | Bin 0 -> 294 bytes .../ml_online/resources/iconShoutcastRadio.png | Bin 0 -> 277 bytes .../ml_online/resources/iconShoutcastTv.png | Bin 0 -> 197 bytes .../ml_online/resources/iconSingingfish.png | Bin 0 -> 249 bytes .../Library/ml_online/resources/iconWaMusic.png | Bin 0 -> 300 bytes .../Library/ml_online/resources/iconWaRemote.png | Bin 0 -> 264 bytes .../ml_online/resources/pages/serviceEditor.htm | 30 +++++++ .../Library/ml_online/resources/pages/webdev.js | 95 +++++++++++++++++++++ .../Library/ml_online/resources/service64x64.png | Bin 0 -> 1667 bytes 13 files changed, 125 insertions(+) create mode 100644 Src/Plugins/Library/ml_online/resources/iconAol.png create mode 100644 Src/Plugins/Library/ml_online/resources/iconAolGames.png create mode 100644 Src/Plugins/Library/ml_online/resources/iconDefault.png create mode 100644 Src/Plugins/Library/ml_online/resources/iconIn2Tv.png create mode 100644 Src/Plugins/Library/ml_online/resources/iconMusicNow.png create mode 100644 Src/Plugins/Library/ml_online/resources/iconShoutcastRadio.png create mode 100644 Src/Plugins/Library/ml_online/resources/iconShoutcastTv.png create mode 100644 Src/Plugins/Library/ml_online/resources/iconSingingfish.png create mode 100644 Src/Plugins/Library/ml_online/resources/iconWaMusic.png create mode 100644 Src/Plugins/Library/ml_online/resources/iconWaRemote.png create mode 100644 Src/Plugins/Library/ml_online/resources/pages/serviceEditor.htm create mode 100644 Src/Plugins/Library/ml_online/resources/pages/webdev.js create mode 100644 Src/Plugins/Library/ml_online/resources/service64x64.png (limited to 'Src/Plugins/Library/ml_online/resources') diff --git a/Src/Plugins/Library/ml_online/resources/iconAol.png b/Src/Plugins/Library/ml_online/resources/iconAol.png new file mode 100644 index 00000000..c48a9cda Binary files /dev/null and b/Src/Plugins/Library/ml_online/resources/iconAol.png differ diff --git a/Src/Plugins/Library/ml_online/resources/iconAolGames.png b/Src/Plugins/Library/ml_online/resources/iconAolGames.png new file mode 100644 index 00000000..d5dce983 Binary files /dev/null and b/Src/Plugins/Library/ml_online/resources/iconAolGames.png differ diff --git a/Src/Plugins/Library/ml_online/resources/iconDefault.png b/Src/Plugins/Library/ml_online/resources/iconDefault.png new file mode 100644 index 00000000..6a2d99e6 Binary files /dev/null and b/Src/Plugins/Library/ml_online/resources/iconDefault.png differ diff --git a/Src/Plugins/Library/ml_online/resources/iconIn2Tv.png b/Src/Plugins/Library/ml_online/resources/iconIn2Tv.png new file mode 100644 index 00000000..5df2581b Binary files /dev/null and b/Src/Plugins/Library/ml_online/resources/iconIn2Tv.png differ diff --git a/Src/Plugins/Library/ml_online/resources/iconMusicNow.png b/Src/Plugins/Library/ml_online/resources/iconMusicNow.png new file mode 100644 index 00000000..ca645c9e Binary files /dev/null and b/Src/Plugins/Library/ml_online/resources/iconMusicNow.png differ diff --git a/Src/Plugins/Library/ml_online/resources/iconShoutcastRadio.png b/Src/Plugins/Library/ml_online/resources/iconShoutcastRadio.png new file mode 100644 index 00000000..72ea4648 Binary files /dev/null and b/Src/Plugins/Library/ml_online/resources/iconShoutcastRadio.png differ diff --git a/Src/Plugins/Library/ml_online/resources/iconShoutcastTv.png b/Src/Plugins/Library/ml_online/resources/iconShoutcastTv.png new file mode 100644 index 00000000..85fcfbca Binary files /dev/null and b/Src/Plugins/Library/ml_online/resources/iconShoutcastTv.png differ diff --git a/Src/Plugins/Library/ml_online/resources/iconSingingfish.png b/Src/Plugins/Library/ml_online/resources/iconSingingfish.png new file mode 100644 index 00000000..a3b7c57f Binary files /dev/null and b/Src/Plugins/Library/ml_online/resources/iconSingingfish.png differ diff --git a/Src/Plugins/Library/ml_online/resources/iconWaMusic.png b/Src/Plugins/Library/ml_online/resources/iconWaMusic.png new file mode 100644 index 00000000..32ea227a Binary files /dev/null and b/Src/Plugins/Library/ml_online/resources/iconWaMusic.png differ diff --git a/Src/Plugins/Library/ml_online/resources/iconWaRemote.png b/Src/Plugins/Library/ml_online/resources/iconWaRemote.png new file mode 100644 index 00000000..70143fe1 Binary files /dev/null and b/Src/Plugins/Library/ml_online/resources/iconWaRemote.png differ diff --git a/Src/Plugins/Library/ml_online/resources/pages/serviceEditor.htm b/Src/Plugins/Library/ml_online/resources/pages/serviceEditor.htm new file mode 100644 index 00000000..ea7c3bf2 --- /dev/null +++ b/Src/Plugins/Library/ml_online/resources/pages/serviceEditor.htm @@ -0,0 +1,30 @@ + + + + Online Services Editor + + + + + + + + +

Online Services Editor

+
+
+
Id:
+ +
Name:
+ +
Url:
+ +
Icon:
+ +
+ + +
+
+ + \ No newline at end of file diff --git a/Src/Plugins/Library/ml_online/resources/pages/webdev.js b/Src/Plugins/Library/ml_online/resources/pages/webdev.js new file mode 100644 index 00000000..96eb0ab9 --- /dev/null +++ b/Src/Plugins/Library/ml_online/resources/pages/webdev.js @@ -0,0 +1,95 @@ +function GetUrlParam(name) +{ + name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); + var regexS = "[\\?&]"+name+"=([^&#]*)"; + var regex = new RegExp( regexS ); + var results = regex.exec( window.location.href ); + if( results == null ) + return ""; + else + return results[1]; +} + +function WebDev_OpenService(serviceId, forceUrl) +{ + if (typeof(window.external.WebDev) == "undefined") + alert("Cannot access Webdev Api"); + else if (false == window.external.WebDev.serviceOpen(serviceId, forceUrl)) + alert("Unable to open service"); +} +function WebDev_OpenDocumentation() +{ + WebDev_OpenService(701, null); +} + +function WebDev_OpenJSAPI2Test() +{ + WebDev_OpenService(702, null); +} + +function WebDev_CreateService() +{ + if (typeof(window.external.WebDev) == "undefined") + alert("Cannot access Webdev Api"); + else if (false == window.external.WebDev.serviceCreate()) + alert("Unable to create service"); +} + +function WebDevEditor_Init(url) +{ + var serviceId = parseInt(GetUrlParam("serviceId"), 10); + + if (typeof(window.external.WebDev) == "undefined") + alert("Cannot access Webdev Api"); + else + { + var info = window.external.WebDev.serviceGetInfo(serviceId); + if (null == info) + { + alert("Unable to get service information"); + } + else + { + document.getElementById("scvedt_edt_id").value = info.id; + document.getElementById("scvedt_edt_name").value = info.name; + document.getElementById("scvedt_edt_url").value = info.url; + document.getElementById("scvedt_edt_icon").value = info.icon; + } + } +} + +function WebDevEditor_Save() +{ + if (typeof(window.external.WebDev) == "undefined") + alert("Cannot access Webdev Api"); + else + { + var serviceId = parseInt(document.getElementById("scvedt_edt_id").value, 10); + if (0 != serviceId) + { + var serviceName = document.getElementById("scvedt_edt_name").value; + var serviceUrl = document.getElementById("scvedt_edt_url").value; + var serviceIcon = document.getElementById("scvedt_edt_icon").value; + if (false == window.external.WebDev.serviceSetInfo(serviceId, serviceName, serviceIcon, serviceUrl, true)) + { + alert("Unable to set service info"); + } + if (false == window.external.WebDev.serviceOpen(serviceId, 1)) + { + alert("Unable to navigate"); + } + } + } +} + +function WebDevEditor_Close() +{ + if (typeof(window.external.WebDev) == "undefined") + alert("Cannot access Webdev Api"); + else + { + var serviceId = parseInt(document.getElementById("scvedt_edt_id").value, 10); + if (0 == serviceId || false == window.external.WebDev.serviceOpen(serviceId, 1)) + alert("Unable to navigate"); + } +} \ No newline at end of file diff --git a/Src/Plugins/Library/ml_online/resources/service64x64.png b/Src/Plugins/Library/ml_online/resources/service64x64.png new file mode 100644 index 00000000..8aaea002 Binary files /dev/null and b/Src/Plugins/Library/ml_online/resources/service64x64.png differ -- cgit