function tinybrowser_set_js_variables in TinyBrowser 7
4 calls to tinybrowser_set_js_variables()
- tinybrowser_init in ./
tinybrowser.module - Implements hook_init().
- tinybrowser_textarea in ./
tinybrowser.module - Inline image/link insertion to textareas.
- tinybrowser_user_page in ./
tinybrowser.userpage.inc - Contents of user account page
- tinybrowser_wysiwyg_plugin in ./
tinybrowser.module - Implements hook_wysiwyg_plugin().
File
- ./
tinybrowser.module, line 67
Code
function tinybrowser_set_js_variables() {
global $base_url;
static $complete = FALSE;
if (!$complete) {
$tbdir_url = $base_url . '/' . drupal_get_path('module', 'tinybrowser') . '/tinybrowser/';
drupal_add_js(array(
'tinybrowser' => array(
'tbdir_url' => $tbdir_url,
'window_width' => tinybrowser_get_window_width() + 15,
'window_height' => tinybrowser_get_window_height() + 15,
),
), 'setting');
$complete = TRUE;
// we should do this only once!
}
}