0

我们正在尝试测试 https://developers.google.com/gmail/contextual_gadgets上给出的上下文小工具 Hello World 。但是我们在加载小工具时遇到了问题。我们在 4 天之前在 gmail 中加载了小工具,之后它现在被删除了。但是昨天我们添加了新的小工具,但名称不同,但旧的小工具仍在 gmail 中加载。那么,我们应该如何知道 gmail 中加载了哪个小工具 XML 路径?

<!-- This one is not specific to Gmail contextual gadgets. -->
<Require feature="dynamic-height"/>
   <!-- The next feature, google.contentmatch, is required for all
 Gmail contextual gadgets.
 <Param> - specify one or more comma-separated extractor IDs in
 a param named "extractors". This line is overridden by the extractor ID
 in the manifest, but is still expected to be present. -->
<Require feature="google.contentmatch">
  <Param name="extractors">
    google.com:HelloWorld,google.com:SenderEmailExtractor
    </Param>
   </Require>
 </ModulePrefs>

<!-- Define the content type and display location. The settings
"html" and "card" are required for all Gmail contextual gadgets. -->
<Content type="html" view="card">
<![CDATA[
  <!-- Start with Single Sign-On -->
  <script type="text/javascript" src="https://example.com/gadgets/sso.js"></script>
  <script type="text/javascript">
    alert("google");
    <!-- Fetch the array of content matches. -->
    matches = google.contentmatch.getContentMatches();
    var matchList = document.createElement('UL');
    var listItem;
    var extractedText;
    <!-- Iterate through the array and display output for each match. -->
    for (var match in matches) {
      for (var key in matches[match]) {
        listItem = document.createElement('LI');

        extractedText = document.createTextNode( ": dm" );
        extractedText = document.createTextNode(key + ": " + matches[match][key]);
        listItem.appendChild(extractedText);
        matchList.appendChild(listItem);
      }
    }
    document.body.appendChild(matchList);
    gadgets.window.adjustHeight(100);
      </script>
    ]]>
 </Content>

即使小工具在帐户中被删除,但小工具仍会在电子邮件中加载。我们已经&nogadgetcache=1在地址栏中尝试过,但在再次登录 gmail 帐户后它不起作用。

4

0 回答 0