0

An error occurred: The package is using features that are no longer permitted in new applications. Please refer to the blog post for details.

I will be hosting an image of Wikionaty elsewhere for the finished product, just testing at the moment.

From the link above: "Beginning this week, you won’t be able to publish legacy packaged apps in the Chrome Web Store that request any of the following permissions: (a) any host permissions, including "< all urls >" ". Is this my problem? How can I get around this? There are many extensions that use a dictionary.

This is my manifest.json:

{
  "name": "my app",
  "description": "this is my app",
  "version": "1.4",  
  "manifest_version": 2,

  "content_security_policy": "script-src 'self' https://en.wiktionary.org; object-src 'self'",


  "background": {
    "page": "background.html"
  },

"app": {
    "launch": {
      "local_path": "index.html"    

    }
  },

  "icons": {
    "128": "icon.png",
    "16": "icon.png"
  },
  "permissions": [  

    "http://*/*", 
    "https://*/*", 
    "https://en.wiktionary.org/",
    "tabs",
    "contextMenus",
    "storage",
    "unlimitedStorage",
    "notifications"]

}

The offending JS. The extension was uploading before this was added

var baseURL = 'http://en.wiktionary.org';
function showPage(page,text) {
  var sourceurl = baseURL + '/wiki/' + page;
  $('#pagetitle').text(page);
  $('#wikiInfo').html(text);
  $('#sourceurl').attr('href',sourceurl);
  $('#licenseinfo').show();


  $('#wikiInfo').children("ol:lt(1)").attr('', 
    function() { //console.log(this);
  $(" ol li ul").detach();
  $(" ol li ul").detach();
var wikiDefine = this.textContent;

  var wikiDefineShort = jQuery.trim(wikiDefine).substring(0, 500)  the definition for google local storage
                          .trim(this) + "...";

    runArray();  
    wordObject[wordObject.length]= { word: page, definition: wikiDefineShort };
    runArray();
    chrome.storage.sync.set({"myValue": wordObject}); /////save

  });

}

$(document).ready(function() {
  $('#pagetitle').hide();
  $('#word').change(function() {


    var page = this.value.toLowerCase();
    $('#loading').html('...please wait...');
    $.getJSON(baseURL+'/w/api.php?action=parse&format=json&prop=text|revid|displaytitle&page='+page,
    function(json) {
                                          $('#loading').html('');

                                          console.log(json.parse);
                                          if(json.parse === undefined) {

                                            console.log("word not found");
                                            wordObject[wordObject.length]= { word: page, definition: "word not found - double click here to add definition" };
                                              runArray();
                                              chrome.storage.sync.set({"myValue": wordObject}); /////save
                                              document.getElementById("word").value = "";


                                          } else {
                                            showPage(page,json.parse.text['*']);
                                            $('#wikiInfo').html("<div></div>");
                                            document.getElementById("word").value = "";
                                          }





    });
  });
});
4

0 回答 0