Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: popup.js

Issue 29338503: Issue 3823 - Adapt message names used by "Block element" feature for consistency (Closed)
Patch Set: Rebased Created March 19, 2016, 7:41 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « blockElement.postload.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: popup.js
===================================================================
--- a/popup.js
+++ b/popup.js
@@ -48,7 +48,7 @@
if (checkWhitelisted(page))
document.body.classList.add("disabled");
- page.sendMessage({type: "blockelement-get-state"}, function(response)
+ page.sendMessage({type: "composer.content.getState"}, function(response)
{
if (response && response.active)
document.body.classList.add("clickhide-active");
@@ -84,7 +84,7 @@
function onMessage(message, sender, callback)
{
- if (message.type == "report-html-page" && sender.page.id == page.id)
+ if (message.type == "composer.ready" && sender.page.id == page.id)
document.body.classList.remove("nohtml");
}
@@ -120,7 +120,7 @@
function activateClickHide()
{
document.body.classList.add("clickhide-active");
- page.sendMessage({type: "blockelement-start-picking-element"});
+ page.sendMessage({type: "composer.content.startPickingElement"});
// Close the popup after a few seconds, so user doesn't have to
activateClickHide.timeout = window.setTimeout(ext.closePopup, 5000);
@@ -134,7 +134,7 @@
activateClickHide.timeout = null;
}
document.body.classList.remove("clickhide-active");
- page.sendMessage({type: "blockelement-finished"});
+ page.sendMessage({type: "composer.content.finished"});
}
function toggleCollapse(event)
« no previous file with comments | « blockElement.postload.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld