From e9a248f9e9ff9a5b816338a634a0ace1d4883471 Mon Sep 17 00:00:00 2001 From: Joakim Reinert Date: Sat, 18 Apr 2015 22:18:26 +0200 Subject: Use require.js for javascript loading --- application/helpers/filebin_helper.php | 24 ---------------------- application/views/file/fragments/thumbnail.php | 2 -- application/views/file/fragments/uploads_table.php | 1 - application/views/file/upload_history.php | 2 -- application/views/footer.php | 5 ----- application/views/header.php | 4 ++++ 6 files changed, 4 insertions(+), 34 deletions(-) (limited to 'application') diff --git a/application/helpers/filebin_helper.php b/application/helpers/filebin_helper.php index 7fd25d5f4..2ac061e79 100644 --- a/application/helpers/filebin_helper.php +++ b/application/helpers/filebin_helper.php @@ -135,30 +135,6 @@ function link_with_mtime($file) return $link; } -function include_js($file) -{ - static $included = array(); - if (in_array($file, $included) || $file === null) { - return ""; - } - return "\n"; -} - -// kind of hacky, but works well enough for now -function register_js_include($file, $return = false) -{ - static $list = ""; - $list .= include_js($file); - if ($return) { - return $list; - } -} - -function include_registered_js() -{ - return register_js_include(null, true); -} - function handle_etag($etag) { $etag = strtolower($etag); diff --git a/application/views/file/fragments/thumbnail.php b/application/views/file/fragments/thumbnail.php index 603832d44..d830a1bed 100644 --- a/application/views/file/fragments/thumbnail.php +++ b/application/views/file/fragments/thumbnail.php @@ -1,5 +1,3 @@ - -