The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
jQuery cdn fallback
#1
some countries don't allow cdn or cdn goes down for some reason, or your working in localhost with no outside connection then fallback should be added to account for this, I've added to my pull request on github the following, which is added to users/includes/header.php.

<pre>
Code:
<!-- jQuery Fallback -->
<script type="text/javascript">
    if (typeof jQuery == 'undefined') {
        document.write(unescape("{3bc1fe685386cc4c3ab89a3f76566d8931e181ad17f08aed9ad73b30bf28114d}3Cscript src='<?=$us_url_root?>users/js/jquery.js' type='text/javascript'{3bc1fe685386cc4c3ab89a3f76566d8931e181ad17f08aed9ad73b30bf28114d}3E{3bc1fe685386cc4c3ab89a3f76566d8931e181ad17f08aed9ad73b30bf28114d}3C/script{3bc1fe685386cc4c3ab89a3f76566d8931e181ad17f08aed9ad73b30bf28114d}3E"));
    }
</script>
</pre>

  Reply
#2
I like this. I'm adding this to the list. I should get an update out this week.

One of the other things I ran into is that I'm building an escape room based on userspice, mqtt, and a bunch of raspberry pi's and arduinos. For security reasons it is air-gapped (no internet connection). I had to go through all the headers and footers and re-point all the jq, bootstrap, and font awesome to local versions. Serious pain. I guess it would be good to have fallback through the whole project. I didn't even know that was a thing.
  Reply
#3
sounds awesome, i discovered years back working with wordpress, defo a must for a project of this kind, shouldn't be a problem for other scripts
  Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)