diff --git a/build/utils.sh b/build/utils.sh index 6e9432d..b8e2e2e 100755 --- a/build/utils.sh +++ b/build/utils.sh @@ -10,6 +10,13 @@ do_build() { && ninja) } +do_quick_install() { + (cd "$(dirname "${DIR}")/build/src" \ + && sudo cp lightdm-webkit2-greeter /usr/bin \ + && sudo cp liblightdm-webkit2-greeter-webext.so /usr/lib/lightdm-webkit2-greeter \ + && sudo cp -R ../../themes/antergos /usr/share/lightdm-webkit/themes) +} + clean_build_dir() { (cd "${DIR}" \ && find . -type f ! -path './ci*' ! -name '.gitignore' ! -name utils.sh -delete \ @@ -49,4 +56,8 @@ case "$1" in build) clean_build_dir && do_build ;; + + build-dev) + clean_build_dir && do_build && do_quick_install + ;; esac diff --git a/src/webkit2-extension.c b/src/webkit2-extension.c index 9012ff4..e5a8619 100644 --- a/src/webkit2-extension.c +++ b/src/webkit2-extension.c @@ -1914,36 +1914,21 @@ void web_page_console_message_sent_cb(WebKitWebPage *web_page, WebKitConsoleMessage *console_message, gpointer user_data) { - WebKitConsoleMessageLevel msg_level; - WebKitConsoleMessageSource msg_source; WebKitDOMDOMWindow *dom_window; WebKitDOMDocument *dom_document; const gchar *msg_text; - gboolean is_error, is_from_javascript, is_exception; - - msg_level = webkit_console_message_get_level(console_message); - is_error = WEBKIT_CONSOLE_MESSAGE_LEVEL_ERROR == msg_level; - - if (! is_error) { - return; - } - - msg_source = webkit_console_message_get_source(console_message); - is_from_javascript = WEBKIT_CONSOLE_MESSAGE_SOURCE_JAVASCRIPT == msg_source; - - if (! is_from_javascript) { - return; - } + gboolean is_error; msg_text = webkit_console_message_get_text(console_message); - is_exception = + is_error = NULL != strstr(msg_text, "Uncaught") || NULL != strstr(msg_text, "Error") || NULL != strstr(msg_text, "error") || NULL != strstr(msg_text, "Exception") || - NULL != strstr(msg_text, "exception"); + NULL != strstr(msg_text, "exception") || + NULL != strstr(msg_text, "ERROR"); - if (! is_exception) { + if (! is_error) { return; } diff --git a/themes/antergos/js/greeter.js b/themes/antergos/js/greeter.js index 12a7b05..a529f70 100644 --- a/themes/antergos/js/greeter.js +++ b/themes/antergos/js/greeter.js @@ -896,7 +896,7 @@ class AntergosTheme { /** * Initialize the theme once the window has loaded. */ -$( window ).load( () => { +$( window ).on('load', () => { new AntergosThemeUtils(); new AntergosTheme(); } );