Browse Source

This should have been in that uninlining commit

spaghetti 8 years ago
parent
commit
d660980117
2 changed files with 15 additions and 1 deletions
  1. 1
    1
      design/publicheader.php
  2. 14
    0
      static/functions/public.js

+ 1
- 1
design/publicheader.php View File

10
   <link rel="shortcut icon" href="favicon.ico?v=<?=md5_file('favicon.ico');?>" />
10
   <link rel="shortcut icon" href="favicon.ico?v=<?=md5_file('favicon.ico');?>" />
11
   <link href="<?=STATIC_SERVER ?>styles/public/style.css?v=<?=filemtime(SERVER_ROOT.'/static/styles/public/style.css')?>" rel="stylesheet" type="text/css" />
11
   <link href="<?=STATIC_SERVER ?>styles/public/style.css?v=<?=filemtime(SERVER_ROOT.'/static/styles/public/style.css')?>" rel="stylesheet" type="text/css" />
12
 <?
12
 <?
13
-  $Scripts = ['jquery', 'script_start', 'ajax.class', 'cookie.class', 'storage.class', 'global'];
13
+  $Scripts = ['jquery', 'script_start', 'ajax.class', 'cookie.class', 'storage.class', 'global', 'public'];
14
   foreach($Scripts as $Script) {
14
   foreach($Scripts as $Script) {
15
     if (($ScriptStats = G::$Cache->get_value("script_stats_$Script")) === false || $ScriptStats['mtime'] != filemtime(SERVER_ROOT.STATIC_SERVER."functions/$Script.js")) {
15
     if (($ScriptStats = G::$Cache->get_value("script_stats_$Script")) === false || $ScriptStats['mtime'] != filemtime(SERVER_ROOT.STATIC_SERVER."functions/$Script.js")) {
16
       $ScriptStats['mtime'] = filemtime(SERVER_ROOT.STATIC_SERVER."functions/$Script.js");
16
       $ScriptStats['mtime'] = filemtime(SERVER_ROOT.STATIC_SERVER."functions/$Script.js");

+ 14
- 0
static/functions/public.js View File

1
+if ($('#no-cookies')) {
2
+  cookie.set('cookie_test', 1, 1);
3
+  if (cookie.get('cookie_test') != null) {
4
+      cookie.del('cookie_test');
5
+  } else {
6
+      $('#no-cookies').gshow();
7
+  }
8
+}
9
+
10
+$(() => {
11
+  if ($('#bg_data')) {
12
+    $('#content')[0].style.backgroundImage = "url(/misc/bg/"+$('#bg_data')[0].attributes.bg.value+")";
13
+  }
14
+})

Loading…
Cancel
Save