aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/contentscript.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/scripts/contentscript.js')
-rw-r--r--app/scripts/contentscript.js22
1 files changed, 16 insertions, 6 deletions
diff --git a/app/scripts/contentscript.js b/app/scripts/contentscript.js
index 4b674dcc0..acacf5d4c 100644
--- a/app/scripts/contentscript.js
+++ b/app/scripts/contentscript.js
@@ -37,28 +37,33 @@ function setupInjection () {
function setupStreams () {
// setup communication to page and plugin
- var pageStream = new LocalMessageDuplexStream({
+ const pageStream = new LocalMessageDuplexStream({
name: 'contentscript',
target: 'inpage',
})
pageStream.on('error', console.error)
- var pluginPort = extension.runtime.connect({name: 'contentscript'})
- var pluginStream = new PortStream(pluginPort)
+ const pluginPort = extension.runtime.connect({ name: 'contentscript' })
+ const pluginStream = new PortStream(pluginPort)
pluginStream.on('error', console.error)
// forward communication plugin->inpage
pageStream.pipe(pluginStream).pipe(pageStream)
// setup local multistream channels
- var mx = ObjectMultiplex()
+ const mx = ObjectMultiplex()
mx.on('error', console.error)
mx.pipe(pageStream).pipe(mx)
+ mx.pipe(pluginStream).pipe(mx)
// connect ping stream
- var pongStream = new PongStream({ objectMode: true })
+ const pongStream = new PongStream({ objectMode: true })
pongStream.pipe(mx.createStream('pingpong')).pipe(pongStream)
- // ignore unused channels (handled by background)
+ // connect phishing warning stream
+ const phishingStream = mx.createStream('phishing')
+ phishingStream.once('data', redirectToPhishingWarning)
+
+ // ignore unused channels (handled by background, inpage)
mx.ignoreStream('provider')
mx.ignoreStream('publicConfig')
}
@@ -88,3 +93,8 @@ function suffixCheck () {
}
return true
}
+
+function redirectToPhishingWarning () {
+ console.log('MetaMask - redirecting to phishing warning')
+ window.location.href = 'https://metamask.io/phishing.html'
+}
few entriesJon Trowbridge2001-12-1210-230/+399 * Don't expunge when we sync anymore, this fixes bug #4472.Jeffrey Stedfast2001-12-112-2/+7 * Make sure that the message subject is non-NULL beforetrying to base aJeffrey Stedfast2001-12-114-29/+40 * set paper size to _("US-Letter"), use gtk_html_print_set_masterRadek Doulik2001-12-112-2/+7 * Don't just assume all of the GtkHTMLEmbedded's fields are filled in, sinceDan Winship2001-12-105-7/+35 * Implements marking messages as "Need Reply".Jon Trowbridge2001-12-105-48/+144 * Check that the mail-display hasn't been destroyed.Jeffrey Stedfast2001-12-084-7/+42 * s/PREVIEW_RELEASE/VERSION_COMMENTJeffrey Stedfast2001-12-072-1/+5 * ack, forgot about this piece of the patchJeffrey Stedfast2001-12-071-1/+1 * Don't append "(Preview Version)" at the end of the version string. Use theJeffrey Stedfast2001-12-072-6/+9 * fixed changelog merge conflictsJeffrey Stedfast2001-12-071-1/+0 * Setup the UI for the AddSenderToAddressbook ui verb thingy.Jeffrey Stedfast2001-12-074-39/+24 * Allow 'n' and 'p' to work when multiple messages are selected. FixesJon Trowbridge2001-12-052-6/+9 * If the path exists, make sure it's a regular file (or we can't possiblyJeffrey Stedfast2001-12-043-24/+58 * Fix the boolean check to be && and not ||.Jeffrey Stedfast2001-12-012-1/+6 * Reverted the non-NULL mime-type patch from a little while back, didn'tJeffrey Stedfast2001-11-282-6/+8 * merged from evoution-1-0-branchNot Zed2001-11-285-24/+38 * Reverted my hide_save_state patch.Jeffrey Stedfast2001-11-222-6/+4 * 'n' shouldn't wrap if 'p' doesn't.Jeffrey Stedfast2001-11-212-9/+5 * Save hide state. (message_list_hide_uids): Save hide state.Jeffrey Stedfast2001-11-173-6/+25 * Undo a really weird mangling of part of the ChangeLog from last AugustDan Winship2001-11-161-42/+42 * s/_/U_/ (filter_rule_set_name requires UTF-8 string)Chyla Zbigniew2001-11-152-4/+10 * Instead of doing pthread_exit() after redirecting the SEGV, try to lock aDan Winship2001-11-152-1/+17 * Call e_passwords_remember_password() for account passwords if the user setJeffrey Stedfast2001-11-152-8/+23 * Add a NULL check for rule->name. (mail_vfolder_add_uri): Same here.Jeffrey Stedfast2001-11-132-6/+20 * If we already have the message loaded in the mail-display, don't botherJeffrey Stedfast2001-11-112-3/+15 * Was x_evolution_message_parse from folder-browser.c. A space char is noJeffrey Stedfast2001-11-105-68/+69 * Call mail_config_pgp_type_detect_from_path() instead of doing our own lameJeffrey Stedfast2001-11-094-20/+243 * Add a "x-inline-pgp-hack=true" paramter to the multipart's content-type.Jeffrey Stedfast2001-11-082-1/+7 * Don't make the account editor modal either.Jeffrey Stedfast2001-11-067-62/+109 * Override the Move/Copy handlers setup by the folder_browser_ui code, and52001-11-063-1/+113 * Renamed from mail_html_write_string.Jeffrey Stedfast2001-11-066-171/+205 * Use GINT_TO_POINTER here for platforms where simply casting an int to voidChristopher James Lahey2001-11-032-3/+14 * Disconnect from the message_list_built function so we dont do it every22001-11-035-9/+49 * fix cut & paste from the message body.Larry Ewing2001-11-022-2/+6 * Write out the url before callind add_url since add_url may free it. FixesDan Winship2001-11-023-4/+9 * Don't use a case-sensitive comparison.Jeffrey Stedfast2001-11-012-2/+8 * Make this work again.Dan Winship2001-11-012-1/+4 * add delete_event_handler. (menu_file_save_close_cb): add save and closeLarry Ewing2001-10-312-5/+34 * Turn it off.02001-10-312-1/+3 * Added exception strings to some of the op logging.02001-10-313-23/+12 * If we have a cancellation setup, destroy it immediately, to save fd's.02001-10-312-3/+15 * Comment out the Folder: and you've got mail prints.02001-10-303-21/+52 * Oops, dont use the url storage path to offset the folder name we're02001-10-302-2/+7 * Require gal 0.15.99.8Joe Shaw2001-10-306-8/+6 * Argh!!! Dont free the async op data here, the async op is still running02001-10-3010-43/+83 * Don't warn the user if the source and destination folders are the same.Jeffrey Stedfast2001-10-303-4/+7 * add some debug spew re 13839.Dan Winship2001-10-303-0/+10 * Fixed a warning by #if 0ing out this function.Christopher James Lahey2001-10-305-2/+44 * Fix the focus check. It's not fb->message_list that has focus, it's one ofDan Winship2001-10-302-1/+7 * Sort the folder updates first, since we dont seem to get them in the right92001-10-293-24/+37 * Copy the folder's full_name before trying to use it to rename.92001-10-297-26/+56 * Call mail_autoreceive_setup() instead of mail_autoreceive_setup_account()Jeffrey Stedfast2001-10-294-24/+15 * Move the message-list cursor to the next message. (transfer_msg): If weJeffrey Stedfast2001-10-292-2/+39 * Check that the special PGP lines begin and end with \n so as to avoidJeffrey Stedfast2001-10-292-17/+21 * fb = user_data, not fb = fb!, fixes 13844.82001-10-292-1/+4 * add the folder name to the path when passing down to the subordinate82001-10-282-3/+10 * Remove uic, kill dumb warning.82001-10-288-44/+174 * Deactivate the Print right-click menu option if the message isn't loaded.Jeffrey Stedfast2001-10-282-8/+13 * Implemented. (mail_vfolder_rename_uri): We do want to check renamed uri's82001-10-286-96/+237 * Allow the user to shoot him/herself in the foot when overriding messageJeffrey Stedfast2001-10-282-1/+30 * More fixing of the license texts.Ettore Perazzoli2001-10-283-31/+31 * More fixing of the license texts.Ettore Perazzoli2001-10-2829-319/+319 * Changed to open the source store from '/', so we can do renames across62001-10-275-15/+342 * Update the licensing information to require version 2 of the GPLEttore Perazzoli2001-10-2726-78/+52 * Work around something that we think is a GtkHTML bug, where sometimes theDan Winship2001-10-274-2/+23 * Set the GdkWindow of the FolderBrowser, not the GtkWindow...Jeffrey Stedfast2001-10-273-4/+10 * Use a timeout not an idle handler.62001-10-264-4/+12 * s/iconv/e_iconv/.52001-10-261-0/+4 * Don't forget to unref the filter driver here.Jeffrey Stedfast2001-10-262-3/+10 * So apparently the uicomp can just 'vanish' while we're using it. Joy. Take52001-10-269-220/+450 * Check for a NULL provider. (build_dialogue): Check for invalid sourceJeffrey Stedfast2001-10-262-3/+32 * No longer need to pass a settext argument. (do_forward_non_attached):Jeffrey Stedfast2001-10-252-2/+6 * oops, minor fixity fix.Jeffrey Stedfast2001-10-251-3/+6 * Fix to not always return NULL for html parts, doh!.Jeffrey Stedfast2001-10-253-10/+15 * Same.42001-10-254-10/+18 * Fixed some weird casting crack that got in here somehow, removedJon Trowbridge2001-10-252-3/+8 * fixed changelogJeffrey Stedfast2001-10-241-1/+0 * Unref the global search_context. (owner_set_cb): create the globalJeffrey Stedfast2001-10-243-19/+43 * all this crap just to make the print icon desensitive at the right time.42001-10-247-48/+108 * Don't allow an auth-type to be set when saving the service.Jeffrey Stedfast2001-10-243-20/+42 * Remove the idle_id when we're destroyed so the idle func doesn't run on an32001-10-242-0/+6 * Dont do anything if we're destroyed #13021.32001-10-242-0/+6 * (do_user_message): Setup the message_destroy_id when we setup theMichael Zucci2001-10-242-1/+3 * fixed a logic mistake from my last commitJeffrey Stedfast2001-10-242-9/+6 * Removed, all functionality moved to mail-session.32001-10-244-398/+414 * Make sure the fb and it's message-list exist. (reply_to_list): same.Jeffrey Stedfast2001-10-243-156/+273 * Added missing errno.h (mail_msg_new): Fix the logic a bit, dont try to32001-10-242-18/+25 * If the fopen() fails (eg, because evolution-mail was started by oafd withDan Winship2001-10-242-3/+14 * Completely re-done. We now hae a completely async dialogue when requested32001-10-238-116/+487 * Oops, revert my change to this function.Jeffrey Stedfast2001-10-232-1/+4 * New fun macro.Jeffrey Stedfast2001-10-234-82/+93 * Added several new accelerators to the edit account dialog, and fixed theAnna Marie Dirks2001-10-232-38/+77 * New class that wraps writing to a GtkHTML stream so that we don't have toJeffrey Stedfast2001-10-235-12/+184 * Don't free `clientid' as it's uninitialized.Ettore Perazzoli2001-10-232-2/+6 * disable this column. Fixes Ximian bug #12381.Christopher James Lahey2001-10-232-1/+6 * #include "component-factory.h". (do_op_status): Pass the component IDEttore Perazzoli2001-10-234-5/+16 * Don't wrap error text with <blockquote>, this is done insideJeffrey Stedfast2001-10-233-30/+47 * Move the folder sync code along with a few other things fromJeffrey Stedfast2001-10-232-39/+59 * PGP verification UI changes to make it not HTML spoofable.Dan Winship2001-10-233-540/+495 * Fix these functions so they don't crash evolution-mail. Too bad it stillDan Winship2001-10-222-7/+12 * Use mail_format_get_data_wrapper_text for text parts so we get freeJeffrey Stedfast2001-10-224-59/+104 * Instead of select_all() then using the tree's selected nodes to iterate,22001-10-222-2/+20 * fixed bug #13151Jeffrey Stedfast2001-10-224-6/+29 * Clear variables once done, for debugging. (mail_vfolder_add_uri,12001-10-226-37/+65 * Update for e_msg_composer_add_messages_attachments arg change.Dan Winship2001-10-222-2/+8 * Don't leak our ESearchingTokenizer.Jon Trowbridge2001-10-212-1/+9 * hook up zoom functions.Larry Ewing2001-10-214-1/+35 * Allow copy/move to/from vTrash folders as well.Jeffrey Stedfast2001-10-202-1/+4 * Properly handle local vTrash folders.Jeffrey Stedfast2001-10-202-13/+23 * Update to reflect API changes to e_msg_composer_add_message_attachments().Jeffrey Stedfast2001-10-202-1/+3 * Dont translate camel strings. (mail_account_gui_setup): "92001-10-202-9/+14 * Pass the @folder_type to ::handleDrop.Ettore Perazzoli2001-10-202-2/+10 * Update to reflect API changes to e_msg_composer_add_message_attachments().Jeffrey Stedfast2001-10-202-3/+9 * Free folders_uri. (real_folder_deleted): If folder is deleted, remove it92001-10-194-43/+59 * Added remove flag - its not adduri, its removeuri, its less typing than82001-10-196-53/+124 * Don't make the mail settings dialog modal.Jeffrey Stedfast2001-10-192-3/+9 * Fix the WM problems related to the folder selection dialog beingEttore Perazzoli2001-10-193-2/+12 * call setup_send_data *after* we've setup the global dialogue thingy.82001-10-192-11/+22 * change va_copy to G_VA_COPYDan Winship2001-10-192-4/+7 * Use va_copy to make this compile on ppc again.Dan Winship2001-10-192-1/+6 * Clone the folderinfo before passing to async event. (real_folder_created):72001-10-183-3/+18 * No longer need to copy the description now that camel-exceptions have beenJeffrey Stedfast2001-10-182-8/+5 * Helper macro.Jeffrey Stedfast2001-10-185-30/+30 * Don't use gnome_dialog_run_and_close() here, we can easily get away withJeffrey Stedfast2001-10-182-19/+43 * Only empty trash on enabled accounts, fixes #12821.72001-10-182-1/+6 * Make Reply-To bold too since no one ever figures out why it's notDan Winship2001-10-182-1/+6 * Fix typoIain Holmes2001-10-172-1/+5 * Lets put the UID cache in ~/evolution/mail/pop3 as this makes more senseJeffrey Stedfast2001-10-172-2/+27 * Check that the cursor_uid is non-NULL before emitting a "message_selected"Jeffrey Stedfast2001-10-172-1/+7 * Always explicitly clear out the SearchInfo.Jon Trowbridge2001-10-172-4/+13 * folder-browser.c: (folder_browser_set_message_preview): Return do nothingMichael Zucci2001-10-172-6/+24 * Added an async_event handler to store_info. (mail_note_store): Setup asyncMichael Zucci2001-10-179-169/+224 * New function to return the id of the currently executing proxied event.62001-10-175-8/+116 * don't write strings longer than they actually are.Larry Ewing2001-10-162-4/+12 * Remove the mark_seen timeout.Jeffrey Stedfast2001-10-162-3/+13 * conflict droppingsLarry Ewing2001-10-161-1/+0 * don't apply the body text in replys since we will just replace it anyway.Larry Ewing2001-10-162-1/+7 * Call mail_vfolder_shutdown.Jeffrey Stedfast2001-10-165-7/+57 * Proxy get-password call to main thread. (forget_password): same for52001-10-164-5/+182 * fixed a typoJeffrey Stedfast2001-10-161-1/+1 * Share more state between the parent and its clones, so that our multipleJon Trowbridge2001-10-152-29/+78 * Bad hacker! Don't implicitly assume that utf8 characters are one byte inJon Trowbridge2001-10-142-3/+16 * Don't emit a gtk warning if the composer creation fails.Dan Winship2001-10-142-3/+8 * Revert the change to remove the Score column until Chris can fix ETable soDan Winship2001-10-134-11/+70 * Fix race conditions in creating foldersIain Holmes2001-10-132-2/+12 * call e_passwords_init and e_passwords_shutdown.Chris Toshok2001-10-135-107/+102 * Convert URLS so we can get clickable links.Jeffrey Stedfast2001-10-132-1/+4 * removed Score stuff from the message-listJeffrey Stedfast2001-10-134-63/+15 * Store our listener id. (popup_info_free): Disconnect our listener when weJon Trowbridge2001-10-122-3/+14 * Listen for "destroy" events from the control, so that we don't leave strayJon Trowbridge2001-10-122-0/+25 * Added a checkbox for body indexing.12001-10-124-4/+85 * oops, and here tooJeffrey Stedfast2001-10-121-2/+2 * pass FALSE along to the add_message_attachments callJeffrey Stedfast2001-10-121-1/+1 * Attach the message attachments. Fixes bug #5439.Jeffrey Stedfast2001-10-122-1/+13 * No longer need to pass folder display name to storage update_folderDan Winship2001-10-126-588/+14 * blahJeffrey Stedfast2001-10-121-1/+0 * Make sure the service/storage are non-NULL.Jeffrey Stedfast2001-10-123-49/+61 * Fix up the logic here.Dan Winship2001-10-112-5/+8 * use new function to copy the attachments from the source message. ThisLarry Ewing2001-10-112-0/+7 * copy the data. We can't ref the byte array and we can't free it so we haveLarry Ewing2001-10-102-2/+10 * IF the source and destination folders are the same, do nothing. Oh, and02001-10-103-52/+89 * ref the part. (save_destroy_cb): new function to unref the part when weLarry Ewing2001-10-102-11/+69 * Ref folder so it hangs around till we're done with it.92001-10-102-0/+9 * Make sure the mail-display is non-NULL.Jeffrey Stedfast2001-10-102-1/+6 * Implement.92001-10-102-0/+23 * Create a chaqrset picker submenu in the View menu.Jeffrey Stedfast2001-10-108-30/+116 * Use gtk_signal_connect_while_alive here so e_gnome_dialog_parent_destroyedDan Winship2001-10-103-25/+60 * Oops.Jon Trowbridge2001-10-101-1/+1 * Revert the change to use e_msg_composer_new_with_message. That hasDan Winship2001-10-102-1/+8 * Update for folder_flags.Dan Winship2001-10-096-18/+23 * Write out the Bcc: header when applicable. Fixes bug #5823.Jon Trowbridge2001-10-092-2/+11 * Convert the htmlinfo into utf8. Fixes bug #11966.Jeffrey Stedfast2001-10-092-5/+11 * For mailstorage folders, connect to the control's "activate" signal, andDan Winship2001-10-092-17/+47 * Remove #ifndef MOVEMAIL_PATH code, since the setting of that variable hasDan Winship2001-10-092-19/+8 * Fix a merge-conflict leftover.Jeffrey Stedfast2001-10-062-4/+5 * reformatted the menu tables so they're a bit more bloody readable.52001-10-064-82/+66 * Add toggle button to config menu to turn the "confirm sending unwantedJon Trowbridge2001-10-065-0/+35 * New convenience function that not only sets the gnome-dialog's parentJeffrey Stedfast2001-10-062-28/+107 * added in the ssl-not-supported label that the code was referencing but which ...Jeffrey Stedfast2001-10-061-1/+28 * use e_msg_composer_new_with_message rather than e_msg_composer_new. ThisLarry Ewing2001-10-062-1/+8 * Turn on "uniform_row_height" argument.Christopher James Lahey2001-10-052-0/+9 * Show "nn sent" as total in sent folder, rather than just 'total'.42001-10-053-3/+11 * Do a better job of setting up the name. Also de-sensitise when we can't42001-10-052-2/+24 * Set the parent window as the fb. This fixes bug #11723. (filter_edit): DoJeffrey Stedfast2001-10-052-9/+28 * Ignore the signal if the radio button is not "on". This fixes bug #10532Jeffrey Stedfast2001-10-055-34/+42 * Fix so that an email address with no name is once again justDan Winship2001-10-052-6/+14 * Only create the folder when the shell has created it.Iain Holmes2001-10-053-3/+9 * If we're accessing a vfolder uri, then popup the vfolder editor instead of42001-10-054-1/+78 * Added some more NULL checks.Jeffrey Stedfast2001-10-052-2/+6 * Do the url fragment/path -> folder name hack. Removing vfolders from shell42001-10-052-27/+17 * Only build destination data if we have destination != NULL. Fixes crash of32001-10-042-1/+4 * Set 'to' -> 'recipient' data for search object. #6199.32001-10-042-0/+7 * Handle vtrash case, emit 'folder_created' event for the folder-cache to32001-10-043-8/+40 * Don't use the wax-seal icons for the pgp stuff anymore, use Jimmac's newJeffrey Stedfast2001-10-042-2/+7 * Dont wait for event to finish before returning. This could however mean we32001-10-043-1/+11 * If we have hide deleted set, then dont count deleted messages in the32001-10-042-1/+23 * If we have a fragment, override that, rather than the path. Fixes #5251.32001-10-042-1/+9 * add $BONOBO_GNOME_CFLAGS to make it work with latest BonoboRodrigo Moya2001-10-042-0/+6 * Pass an empty flags argument to mail_transfer_messages - destinationJeffrey Stedfast2001-10-036-6/+28 * Pass an empty flags argument to mail_tool_uri_to_folder.Jeffrey Stedfast2001-10-0314-29/+89 * Use `bonobo_ui_component_new_default()', not `bonobo_ui_component_new()'.Ettore Perazzoli2001-10-032-1/+7 * Make sure we aren't dealing with a pathological message w/o a From:Jon Trowbridge2001-10-02