Browse Source

add more terms that will trigger theme fallback dialog

sisyphus
Dustin Falgout 8 years ago
parent
commit
b8396f5b86
  1. 1
      src/gresource/js/Greeter.js
  2. 18
      src/webkit2-extension.c

1
src/gresource/js/Greeter.js

@ -326,6 +326,7 @@ const __lightdm = new Promise( (resolve, reject) => {
/** /**
* Greeter Instance
* @name lightdm * @name lightdm
* @type {LightDM.Greeter} * @type {LightDM.Greeter}
* @memberOf window * @memberOf window

18
src/webkit2-extension.c

@ -1814,7 +1814,7 @@ should_block_request(const char *file_path) {
gchar *background_images_dir; gchar *background_images_dir;
gchar *user_image; gchar *user_image;
gchar *logo; gchar *logo;
gboolean result = TRUE; gboolean result = TRUE; /* Blocked */
char *canonical_path; char *canonical_path;
if (NULL == file_path) { if (NULL == file_path) {
@ -1839,8 +1839,7 @@ should_block_request(const char *file_path) {
if (NULL != canonical_path) { if (NULL != canonical_path) {
for (iter = paths; iter; iter = iter->next) { for (iter = paths; iter; iter = iter->next) {
if (strcmp(canonical_path, iter->data) == 0 || g_str_has_prefix(canonical_path, iter->data)) { if (strcmp(canonical_path, iter->data) == 0 || g_str_has_prefix(canonical_path, iter->data)) {
/* Requested path is allowed (don't block request). */ result = FALSE; /* Allowed */
result = FALSE;
break; break;
} }
} }
@ -1920,7 +1919,7 @@ web_page_console_message_sent_cb(WebKitWebPage *web_page,
WebKitDOMDOMWindow *dom_window; WebKitDOMDOMWindow *dom_window;
WebKitDOMDocument *dom_document; WebKitDOMDocument *dom_document;
const gchar *msg_text; const gchar *msg_text;
gboolean is_error, is_from_javascript, is_uncaught_exception; gboolean is_error, is_from_javascript, is_exception;
msg_level = webkit_console_message_get_level(console_message); msg_level = webkit_console_message_get_level(console_message);
is_error = WEBKIT_CONSOLE_MESSAGE_LEVEL_ERROR == msg_level; is_error = WEBKIT_CONSOLE_MESSAGE_LEVEL_ERROR == msg_level;
@ -1937,9 +1936,14 @@ web_page_console_message_sent_cb(WebKitWebPage *web_page,
} }
msg_text = webkit_console_message_get_text(console_message); msg_text = webkit_console_message_get_text(console_message);
is_uncaught_exception = NULL != strstr(msg_text, "Uncaught"); is_exception =
NULL != strstr(msg_text, "Uncaught") ||
if (! is_uncaught_exception) { NULL != strstr(msg_text, "Error") ||
NULL != strstr(msg_text, "error") ||
NULL != strstr(msg_text, "Exception") ||
NULL != strstr(msg_text, "exception");
if (! is_exception) {
return; return;
} }

Loading…
Cancel
Save