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); | |
} | |
}, |
I just created a primitive one, but have no idea to create a specific one yet. ;)
OK, just wondering.
@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. :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I just saw your gist, it's almost exactly what I used as a boilerplate for widgets!
Is there a specific one your trying to create?
Avi