Last active
January 3, 2016 12:59
-
-
Save YungSang/8466518 to your computer and use it in GitHub Desktop.
iChrome Widget の雛形
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template id="template.widgets.hello"> | |
{{#title}}<h2 class="header">{{title}}</h2>{{/title}} | |
</template> | |
<template id="template.widgets.hello.desc"> | |
Hello World | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23: { | |
id: 23, | |
size: 1, | |
order: 0, | |
name: "Hello World", | |
nicename: "hello", | |
sizes: ["small"], | |
desc: "It's a small Hello World.", | |
settings: [ | |
{ | |
type: "text", | |
nicename: "title", | |
label: "Widget Title", | |
placeholder: "Enter a widget title or leave blank to hide" | |
} | |
], | |
config: { | |
title: "Hello World", | |
size: "small" | |
}, | |
render: function() { | |
var data = $.extend({}, this.data || {}); | |
if (this.config.title && this.config.title !== "") { | |
data.title = this.config.title; | |
} | |
this.utils.render(data); | |
} | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@AMKohn
Thank you for comments and also uploading your iChrome project on GitHub.
I compared the source code with the released one in my extensions folder.
I found that it's slightly different; CR/LF <-> NL, icon/*.png and some removed files.
I'd just like to let you know that.
Thanks. :)