How to program a manifest file for a chrome extention - json

I'm trying to upload a chrome extension, but I'm being returned an error that my json file has a syntax error, but I can't figure out what it is. Here's the file:
{
"manifest_version": 2,
"name": "Drive to Tumblr",
"version": "1",
"description": "Posts files from google drive to tumblr",
"icons": "Extention_Logo_48x48.png"
},
"browser_action": {
"default_title": "Drive to Tumblr",
"default_icon": "Extention_Logo_19x19.png",
"default_popup": "button.html"
}
}
I'm using the given syntax on the chrome developers guide, so could anyone tell me what I'm doing wrong?

You don't need the 1st close brace that you have because the browser_action is still part of the main manifest. This should work:
{
"manifest_version": 2,
"name": "Drive to Tumblr",
"version": "1",
"description": "Posts files from google drive to tumblr",
"icons": "Extention_Logo_48x48.png",
"browser_action": {
"default_title": "Drive to Tumblr",
"default_icon": "Extention_Logo_19x19.png",
"default_popup": "button.html"
}
}

Related

How to get chrome extension to get "full access" to all pages without requesting access on each page

Full access and request access image
This picture shows that every time I open a new tab the extension requests access, I want to give it access to all tabs opened, like the top extension has.
Is this because I installed this extension from unpacked directory?
IF so, how can I bypass this? this is a custom extension that will not be going on the google extentionstore.
Add: "host_permissions": ["http:///","https:///"]
To your manifest.json file, under the section of permissions. Here's a full example:
{
"name": "Getting Started Example",
"options_page": "options.html",
"description": "Build an Extension!",
"version": "1.0",
"manifest_version": 3,
"background": {
"service_worker": "background.js"
},
"permissions": ["storage", "activeTab", "scripting","tabs","storage","fontSettings","contentSettings","debugger"],
"host_permissions": ["http://*/*","https://*/*"],
"action": {
"default_popup": "popup.html",
"default_icon": {
"16": "/images/get_started16.png",
"32": "/images/get_started32.png",
"48": "/images/get_started48.png",
"128": "/images/get_started128.png"
}
},
"icons": {
"16": "/images/get_started16.png",
"32": "/images/get_started32.png",
"48": "/images/get_started48.png",
"128": "/images/get_started128.png"
}
}

Why Chrome web store manifest?

Whats wrong chrome doesn't allow to upload a zip file
An error occurred: Failed to process your item.
manifest.json:17:2: unexpected char.
{
"manifest_version": 2,
"name": "TechnoSwift Launcher",
"description": "Quick launch TechnoSwift",
"version": "1.0.1",
"author":"Shareque",
"browser_action": {
"default_icon": "icon.png",
"default_popup": "popup.html",
"default_title": "TechnoSwift Launcher"
},
"permissions": [
"activeTab"
],
}

Invalid manifest message by launching

By launching my extension I get this message:
Invalid manifest
My manifest file is loaded. Here is it:
{
"name": "GoogleMapToContact",
"short_name": "GoogleMTC",
"description": "Save Google Geopoints to Google Contact",
"manifest_version": 2,
"version": "1.0.1",
"start_url": "/?homescreen=1",
"background_color": "#000000",
"theme_color": "#0f4a73",
"icons": {
"src": "map.png",
"sizes": "256x256",
"type": "image/png"
}
}
You have incorrect tags in your manifest.json. First 4 lines are OK.
Bad tags, that are not allowed in extensions manifest, are:
start_url (do you want to specify you entry point?)
background_color (it should be done in your popup file)
theme_color
Icons are written in slightly wrong way :) Here is suggested file
{
"name": "GoogleMapToContact",
"short_name": "GoogleMTC",
"description": "Save Google Geopoints to Google Contact",
"manifest_version": 2,
"version": "1.0.1",
"browser_action": {
"default_icon": "map.png",
"default_popup": "popup.html"
},
"icons": {
"16": "map16x16.png"
}
}

Manifest is not valid JSON. Line: 10, column: 3, Unexpected data after root element

I'm learning about developing Google Chrome extensions. Upon attempting to load my extension, I receive the following message:
Manifest is not valid JSON. Line: 10, column: 3, Unexpected data after root element.
Below is my manifest.json file:
{
"manifest_version": 2,
"name": "ShowTime",
"description": "Extension to show the current date and time",
"version": "1.2",
"default_locale": "en",
"description": "A plain text description",
"icons": {
"16": "icon16.png",
"48": "icon48.png",
"128": "icon128.png"
},
"browser_action": {
"default_title": "ShowTime",
"default_icon": "icon.png",
"default_popup": "popup.html"
}
}

chrome extension javascript problem

I started trying to write chrome extension and I'm having problem with simple function:
script inside "backgroound.html":
chrome.tabs.onUpdated.addListener(function(tabId,changedInfo,tab){alert("a")});
manifest.json file:
{
"name": "ogys",
"version": "1.0",
"description": "description",
"browser_action": {
"default_icon": "icon.png",
"background_page": "background.html"
},
"permissions": ["tabs", "http://code.google.com/"]
}
I understand that an change on any tab would trigger the event but nothing happends.
According with code.google.com, you've defined the backround_page in the wrong place.
Move the background_page property definition outer from browser_action action in this way:
{
"name": "ogys",
"version": "1.0",
"description": "description",
"browser_action": {
"default_icon": "icon.png"
},
"background_page": "background.html",
"permissions": ["tabs", "http://code.google.com"]
}