Permalink
Browse files

initial version

  • Loading branch information...
0 parents commit 363ba11b64a4bc10ac6151f0f9ae29ab543b73a7 @printminion printminion committed Jun 12, 2011
11 README
@@ -0,0 +1,11 @@
+This is the template project for creating chrome extensions. With ant bult.xml you can minify and zip your extensions authomatically.
+
+0. Download Closure compiler from http://code.google.com/p/closure-compiler/downloads/list
+ http://closure-compiler.googlecode.com/files/compiler-latest.zip to ../build/compiler.jar
+1. Define your Vesion in build.xml
+2. Edit manifest.tpl.json
+3. Minify extension code with closure
+4. Archive the extension to the versioned zip archive
+
+Use the bug tracker for bug reporting: http://code.google.com/p/%PUT_PROJECT_ID_HERE%/issues/entry
+Add your translation here: http://www.getlocalization.com/%PUT_PROJECT_ID_HERE%

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+
+<project name="blogmark" default="createextension">
+ <taskdef name="jscomp" classname="com.google.javascript.jscomp.ant.CompileTask" classpath="../build/compiler.jar" />
+
+ <!-- put your version here -->
+ <property name="VERSION" value="0.0.1" />
+
+ <target name="createextension" depends="closure" description="Assemble the final build extension.zip">
+ <zip destfile="extension_v${VERSION}.zip">
+ <zipfileset dir="." includes="extension/**" excludes="extension/manifest.tpl.json,extension/js/chromeExtensionsCode.js" />
+ </zip>
+ </target>
+
+ <target name="templates" description="Generate files from templates.">
+ <copy file="extension/manifest.tpl.json" tofile="extension/manifest.json" overwrite="true">
+ <filterchain>
+ <replacetokens>
+ <token key="VERSION" value="${VERSION}" />
+ </replacetokens>
+ </filterchain>
+ </copy>
+ </target>
+
+
+ <target name="closure" depends="templates" description="Minify javascripts with closure">
+
+ <jscomp compilationLevel="simple" warning="default" debug="false" output="extension/js/chromeExtensionsCode.min.js">
+
+ <sources dir="${basedir}/extension/js">
+ <file name="chromeExtensionsCode.js" />
+ </sources>
+
+ </jscomp>
+
+ </target>
+
+
+</project>
@@ -0,0 +1,2 @@
+
+*.bak
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>mkChromeExtensionTemplate</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+ </natures>
+ <linkedResources>
+ <link>
+ <name>README</name>
+ <type>1</type>
+ <locationURI>PARENT-1-PROJECT_LOC/README</locationURI>
+ </link>
+ <link>
+ <name>build.xml</name>
+ <type>1</type>
+ <locationURI>PARENT-1-PROJECT_LOC/build.xml</locationURI>
+ </link>
+ </linkedResources>
+ <filteredResources>
+ <filter>
+ <id>1299276902517</id>
+ <name></name>
+ <type>22</type>
+ <matcher>
+ <id>org.eclipse.ui.ide.multiFilter</id>
+ <arguments>1.0-name-matches-false-false-*.bak</arguments>
+ </matcher>
+ </filter>
+ </filteredResources>
+</projectDescription>
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path=""/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+</classpath>
@@ -0,0 +1,3 @@
+#Sun Mar 13 19:46:35 CET 2011
+eclipse.preferences.version=1
+encoding/manifest.json=UTF-8
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.JRE_CONTAINER
@@ -0,0 +1 @@
+Global
@@ -0,0 +1,11 @@
+{
+ "ext_name": {
+ "message": "Put your extensions name here"
+ },
+ "ext_description": {
+ "message": "Put your extensions description here."
+ },
+ "some_text": {
+ "message": "Some text"
+ }
+}
@@ -0,0 +1,19 @@
+<html>
+<head>
+<script src="js/analytics.js"></script>
+<script type="text/javascript">
+ // Global accessor that the popup uses.
+ var variable1 = null;
+
+ console.log('background.html');
+
+ chrome.browserAction.onClicked.addListener(function(tab) {
+ console.log('openExtensionManager', tab);
+ });
+</script>
+
+</head>
+<body>
+
+</body>
+</html>
@@ -0,0 +1,12 @@
+/*
+content.css
+*/
+body {
+ font-family: arial, sans-serif;
+ font-size: 0.82em;
+}
+
+
+.hd {
+ display: none;
+}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,9 @@
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', '<%PUT_YOUR_UA_IS_HERE%>']);
+ //_gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
@@ -0,0 +1,6 @@
+/**
+ *
+ */
+
+
+var exampleCode = undefined;
@@ -0,0 +1 @@
+var exampleCode=void 0;

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,20 @@
+function _i18n(e, f) {
+ var str = chrome.i18n.getMessage(e);
+
+ if (str == undefined || str == '') {
+ console.log('"' + e + '": { "message": "' + e + '" },');
+ return;
+ }
+ //console.log('i18n[' + e + ']:' + str);
+ return str;
+}
+
+function __i18n(e, f) {
+ var str = chrome.i18n.getMessage(e, f);
+
+ if (str == undefined || str == '') {
+ console.log('_i18n[' + e + ']:' + str);
+ }
+
+ document.write(str);
+}
@@ -0,0 +1,20 @@
+{
+ "name": "__MSG_ext_name__",
+ "version": "0.0.1",
+ "description": "__MSG_ext_description__",
+ "default_locale": "en",
+ "icons": {
+ "256": "images/icon256.png",
+ "128": "images/icon128.png",
+ "64": "images/icon64.png",
+ "24": "images/icon24.png",
+ "19": "images/icon19.png"
+ },
+ "background_page": "background.html",
+ "permissions": [
+ "tabs", "management"
+ ],
+ "browser_action": {
+ "default_icon": "images/icon19.png"
+ }
+}
@@ -0,0 +1,20 @@
+{
+ "name": "__MSG_ext_name__",
+ "version": "@VERSION@",
+ "description": "__MSG_ext_description__",
+ "default_locale": "en",
+ "icons": {
+ "256": "images/icon256.png",
+ "128": "images/icon128.png",
+ "64": "images/icon64.png",
+ "24": "images/icon24.png",
+ "19": "images/icon19.png"
+ },
+ "background_page": "background.html",
+ "permissions": [
+ "tabs", "management"
+ ],
+ "browser_action": {
+ "default_icon": "images/icon19.png"
+ }
+}

0 comments on commit 363ba11

Please sign in to comment.