On 29/9/22 05:27, Roland Ernst wrote:
>
>
> On Wed, Sep 28, 2022 at 9:15 AM Kingsley Turner <krt@krt.com.au> wrote:
>
> G'day,
>
> During an extended internet outage that thankfully has just finished,
> I came
> to realise that MythWeb depends on some external google javascript for
> basic
> functionality.
>
> Is the any will for removing this dependency?
>
> I'm happy to make the changes, but not if there's any resistance to it.
>
> cheers,
> -kt
>
>
> Fortunately, you do not need to re-event the wheel.
>
> You just need to download two files and place them on the
> locations mentioned in the file
> https://github.com/MythTV/mythweb/blob/92f0f9bc6d15f6d6534e5d5e40bdddbb6f431254/modules/_shared/tmpl/default/header.php#L109
>
>
> Then, you need to set the global setting `mythweb_use_cdn` to 0,
> as described in
> https://forum.mythtv.org/viewtopic.php?f=2&t=3253&p=15747
> <https://forum.mythtv.org/viewtopic.php?f=2&t=3253&p=15747>
> and
> https://code.mythtv.org/trac/ticket/13191
>
> Roland
>
> P.S.: Please report a simple howto in order to make this repeatable for
> other users.
>
> Please report a simple howto
Please find below.
Of course IMHO, I'd rather there not be a dependency at all. As it's
already too late to look this up once you're offline.
thanks,
-kt
|# HOWTO Configure MythWeb to _NOT_ Use Online Javascript Sources
Based on notes by "rds55" (and further comments) found on the [MythTV
Forum](
https://forum.mythtv.org/viewtopic.php?f=2&t=3253&p=15747).
## STEP 1 - Make appropriate directories to hold Offline Copies of the
Javascript
sudo mkdir -p /usr/share/mythtv/mythweb/js/ajax/libs/jquery/3.2.1/
sudo mkdir -p /usr/share/mythtv/mythweb/js/ajax/libs/prototype/1.7.3.0/
## STEP 2 - Download the javascript into these Directories
Note: This is different to the forum instructions (which appear to be a
little backwards), but it is tested and working.
sudo wget
https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js -O
/usr/share/mythtv/mythweb/js/ajax/libs/jquery/3.2.1/jquery.min.js
sudo wget
https://ajax.googleapis.com/ajax/libs/prototype/1.7.3.0/prototype.js -O
/usr/share/mythtv/mythweb/js/ajax/libs/prototype/1.7.3.0/prototype.js
## STEP3 - Configure MythWeb to use the Offline Copy
MYTHSERVER=127.0.0.1 # TODO - use the address of your myth box
curl --data Key=mythweb_use_cdn --data Value=0
$MYTHSERVER:6544/Myth/PutSetting
|
||
||