Skip to content

Instantly share code, notes, and snippets.

@kuc-arc-f
kuc-arc-f / c0605-t1.htm
Created June 5, 2014 07:54
html , test1-0605
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>テストーutf8</title>
<body >
<h1>テストーutf8</h1>
<br />
<p>test-moji</p>
@kuc-arc-f
kuc-arc-f / c0605-t2.htm
Last active August 29, 2015 14:02
html, test2-0605
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>テストー utf8</title>
<body >
<h1>テスト2ーutf8</h1>
<br />
<p>test-moji-2</p>
@kuc-arc-f
kuc-arc-f / c0605-ajax1-Item.js
Created June 5, 2014 08:37
js, sample 0605P2
var Item = function() {
this.id = 0;
this.title =''
this.url = '';
this.toString = function() {
window.alert(this.id + " ," + this.title+ ", "+ this.url_b );
};
}
@kuc-arc-f
kuc-arc-f / c0605-ajax1-ctlNews.js
Created June 5, 2014 08:38
js , sample 0605p2
var mMAX_CountItem=5;
function ctlNews() {
this.name = 'ctlNews';
}
ctlNews.prototype.load_rss = function( surl ) {
var items =new Array();
onload = function() {
document.querySelector('a#id-a-open').onclick = function() {
click_sub();
}
}
function click_sub()
{
chrome.app.window.create(
'sub.html',
{id: "browserSlideID",
bounds: {
'width' : 1024,
'height': 600
}
}
function click_sub()
{
chrome.app.window.create(
'sub.html',
{id: "browserSlideID",
bounds: {
'width' : 1024,
'height': 600
}
}
function click_addStore()
{
var ct = mItems.length;
mItems[ct] = {'id': ct, 'text': 'test-'+ ct };
chrome.storage.local.set({ 'strlist' : mItems });
}
function click_showStore()
{
$('div#id-div-box').remove();
var divShow =$('#id-div-diplay');
var divBox= $('<div id="id-div-box"></div>')
chrome.storage.local.get( 'strlist' , function(value) {
if(value && value.strlist) {
console.log( value.strlist );
console.log( 'len='+ value.strlist.length );
var items = value.strlist;
function click_deleteStore()
{
mItems= new Array();
chrome.storage.local.set({ 'strlist' : mItems });
$('div#id-div-box').remove();
}