machawk1 / Mink

Chrome extension that uses Memento to indicate that a page a user is viewing on the live web has an archived copy and to give the user access to the copy
MIT License
48 stars 3 forks source link

Allow select archives/interfaces to access Mink info using Chrome API #203

Open machawk1 opened 8 years ago

machawk1 commented 8 years ago

Using externally_connectable ( https://developer.chrome.com/extensions/manifest/externally_connectable ), an archive's webUI (or any arbitrary web page, even one on localhost) could be added to the select set of archives aggregated on-the-fly or other webpages (e.g., The Heritrix/Wayback web interfaces in WAIL) could communicate with Mink directly. This might be useful to add buttons onto the archive's web interfaces using content page manipulation.

machawk1 commented 8 years ago

Branch issue-203 has been setup with hooks. A simple web page like the following will invoke a callee's functionality in Mink:

<html>
<body>
<script>
var minkId = "ehlefgjpcinhloogfldmkojonnjpnloo";
chrome.runtime.sendMessage(minkId, {"test": "case!"},
  function(response) {
    if (!response.success)
      handleError(url);
  });

</script>
</body>
</html>
machawk1 commented 8 years ago

@weiglemc @phonedude Per above, web pages and other extensions can communicate to Chrome extensions (i.e., Mink) through message passing. Can you imagine some specific use cases for this?