`;
264 | }
265 | } else {
266 | div.innerHTML = `
267 |
[${libron.selectedPrefecture}]${libron.selectedSystemName}には見つかりません。❌
268 |
269 | `;
270 | }
271 | }
272 |
273 | if (!libron.settingsChanged) {
274 | div.innerHTML += `
※ 図書館を設定するには、Libronを拡張機能のバーに表示して、アイコンをクリックして下さい。[詳細はこちら]`;
275 | }
276 | }
277 | }
278 |
279 | function getValue(key, callback) {
280 | chrome.runtime.sendMessage({
281 | contentScriptQuery: "getValue",
282 | key: key
283 | }, (value) => {
284 | callback(value);
285 | });
286 | }
287 |
--------------------------------------------------------------------------------
/chrome_extension/libron/license-ja.txt:
--------------------------------------------------------------------------------
1 | 本ソフトウェアの著作権は、
2 | コードに特に明記がない物は Junya Ishihara(webmaster@champierre.com) に帰属します。
3 | また、本ソフトウェアのライセンスは MIT License とします。
4 |
5 | ====
6 |
7 | Copyright (c) 2010 Junya Ishihara(http://champierre.com)
8 |
9 | Permission is hereby granted, free of charge, to any person obtaining a copy
10 | of this software and associated documentation files (the "Software"), to deal
11 | in the Software without restriction, including without limitation the rights
12 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 | copies of the Software, and to permit persons to whom the Software is
14 | furnished to do so, subject to the following conditions:
15 |
16 | The above copyright notice and this permission notice shall be included in
17 | all copies or substantial portions of the Software.
18 |
19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | THE SOFTWARE.
26 |
--------------------------------------------------------------------------------
/chrome_extension/libron/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "manifest_version": 3,
3 | "name": "Libron",
4 | "short_name": "Libron",
5 | "icons": {
6 | "16": "images/icon-16.png",
7 | "32": "images/icon-32.png",
8 | "48": "images/icon-48.png",
9 | "128": "images/icon-128.png"
10 | },
11 | "version": "3.0.18",
12 | "description": "Amazon のページから最寄りの図書館の蔵書を検索",
13 | "host_permissions": [
14 | "https://libron.net/news.txt",
15 | "https://api.calil.jp/library",
16 | "https://api.calil.jp/check",
17 | "https://calil.jp/city_list",
18 | "https://www.amazon.co.jp/*",
19 | "http://www.amazon.co.jp/*"
20 | ],
21 | "background": {
22 | "service_worker": "background.js"
23 | },
24 | "content_scripts": [{
25 | "matches": [
26 | "https://www.amazon.co.jp/*",
27 | "http://www.amazon.co.jp/*"
28 | ],
29 | "js":["libron.js"],
30 | "css":["libron.css"]
31 | }],
32 | "web_accessible_resources": [{
33 | "resources": ["images/*"],
34 | "matches": ["
"]
35 | }],
36 | "action": {
37 | "default_popup": "settings.html",
38 | "default_title": "Libron - 図書館の設定"
39 | },
40 | "permissions": [
41 | "storage"
42 | ]
43 | }
44 |
--------------------------------------------------------------------------------
/chrome_extension/libron/settings.css:
--------------------------------------------------------------------------------
1 | body {
2 | width: 36rem;
3 | background:#e8e4db;
4 | font-size:14px;
5 | }
6 |
7 | img {
8 | vertical-align:-4px;
9 | }
10 |
11 | span#title {
12 | font-weight:bold;
13 | color:#e47911;
14 | }
15 |
16 | .gray {
17 | color:#666666;
18 | }
19 |
20 | #news, #info, #buttons, #selects {
21 | margin-top:10px;
22 | }
23 |
24 | div#select_box {
25 | display:none;
26 | }
27 |
--------------------------------------------------------------------------------
/chrome_extension/libron/settings.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |

12 |
ver.3.0.18
13 |
14 |
15 |
16 |
17 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/chrome_extension/libron/settings.js:
--------------------------------------------------------------------------------
1 | let selectedGroup;
2 | let selectedPrefecture;
3 | let selectedSystemName;
4 | let selectedSystemId;
5 | let univChecked;
6 | let settingsChanged;
7 | let libraries = {};
8 | let prefectures = [];
9 |
10 | document.addEventListener('DOMContentLoaded', async (e) => {
11 | updateNews();
12 | libraries = await getLibraries();
13 | prefectures = Object.keys(libraries);
14 | updateUi();
15 | });
16 |
17 | document.querySelector('#update_link').addEventListener('click', (e) => {
18 | e.preventDefault();
19 | showSelect();
20 | });
21 |
22 | document.querySelector('#cancel_link').addEventListener('click', (e) => {
23 | e.preventDefault();
24 | hideSelect();
25 | });
26 |
27 | document.querySelector('#save').addEventListener('click', (e) => {
28 | e.preventDefault();
29 | setValue('selectedGroup', document.querySelector('#library_select option:checked').parentNode.label);
30 | setValue('selectedPrefecture', document.querySelector('#prefecture_select').value);
31 | setValue('selectedSystemId', document.querySelector('#library_select').value);
32 | setValue('selectedSystemName', document.querySelector('#library_select option:checked').text);
33 | setValue('univChecked', univChecked);
34 | setValue('settingsChanged', true);
35 |
36 | updateUi();
37 | hideSelect();
38 |
39 | reloadAmazonTabs();
40 | });
41 |
42 | document.querySelector('#prefecture_select').addEventListener('change', () => {
43 | selectedPrefecture = document.querySelector('#prefecture_select').value;
44 | updateLibrarySelect();
45 | });
46 |
47 | document.querySelector('#univ_checkbox').addEventListener('change', function(){
48 | univChecked = document.querySelector('#univ_checkbox').checked;
49 | updateLibrarySelect();
50 | });
51 |
52 | const showSelect = () => {
53 | document.querySelector('#info').style.display = 'none';
54 | document.querySelector('#select_box').style.display = 'block';
55 | }
56 |
57 | const hideSelect = () => {
58 | document.querySelector('#info').style.display = 'block';
59 | document.querySelector('#select_box').style.display = 'none';
60 | }
61 |
62 | const updateNews = async () => {
63 | const response = await fetch('https://libron.net/news.txt');
64 | const news = await response.text();
65 | document.querySelector('#news').innerHTML = news;
66 | }
67 |
68 | const getLibraries = async () => {
69 | const librariesResponse = await fetch('https://champierre.github.io/libron-api/libraries.json');
70 | const librariesText = await librariesResponse.text();
71 | return JSON.parse(librariesText);
72 | }
73 |
74 | const setupPrefectureSelect = () => {
75 | document.querySelector('select#prefecture_select').innerHTML = prefectures.map(prefecture => {
76 | return ``;
77 | }).join("\n");
78 | }
79 |
80 | const updateUi = () => {
81 | getValue('settingsChanged', (value) => {
82 | settingsChanged = value || false;
83 | getValue('selectedGroup', (value) => {
84 | selectedGroup = value || '図書館(広域)';
85 | getValue('selectedSystemName', (value) => {
86 | selectedSystemName = value || '東京都立図書館';
87 | getValue('selectedSystemId', (value) => {
88 | selectedSystemId = value || 'Tokyo_Pref';
89 | getValue('selectedPrefecture', (value) => {
90 | selectedPrefecture = value || '東京都';
91 | getValue('univChecked', async (value) => {
92 | univChecked = value || false;
93 | document.querySelector('#univ_checkbox').checked = univChecked;
94 | setupPrefectureSelect();
95 | updateLibrarySelect();
96 | document.querySelector('#info span').innerHTML = `[${selectedPrefecture}]${selectedSystemName}で検索`;
97 | });
98 | });
99 | });
100 | });
101 | });
102 | });
103 | }
104 |
105 | const updateLibrarySelect = () => {
106 | let optgroups = '';
107 | for (const group in libraries[selectedPrefecture]) {
108 | const options = libraries[selectedPrefecture][group].map(library => {
109 | if (library.value) {
110 | return ``;
111 | } else {
112 | return ``;
113 | }
114 | }).join("\n");
115 | if (group !== '図書館(大学)' || univChecked) {
116 | optgroups += ``;
117 | }
118 | }
119 | document.querySelector('#library_select').innerHTML = optgroups;
120 | }
121 |
122 | const isSelected = (group, library) => {
123 | return library.value === selectedSystemId && library.name === selectedSystemName && group === selectedGroup
124 | }
125 |
126 | const setValue = (key, value) => {
127 | chrome.runtime.sendMessage({
128 | contentScriptQuery: 'setValue',
129 | key: key,
130 | value: value
131 | });
132 | }
133 |
134 | const getValue = async (key, callback) => {
135 | chrome.runtime.sendMessage({
136 | contentScriptQuery: 'getValue',
137 | key: key
138 | }).then(value => {
139 | callback(value);
140 | });
141 | }
142 |
143 | const reloadAmazonTabs = async () => {
144 | const tabs = await chrome.tabs.query({
145 | url: [
146 | 'https://www.amazon.co.jp/*',
147 | 'http://www.amazon.co.jp/*'
148 | ],
149 | });
150 | tabs.map(tab => chrome.tabs.reload(tab.id));
151 | }
152 |
--------------------------------------------------------------------------------
/chrome_extension/libron/title.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/chrome_extension/libron/title.png
--------------------------------------------------------------------------------
/greasemonkey/libron.user.js:
--------------------------------------------------------------------------------
1 | // ==UserScript==
2 | // @name Libron
3 | // @namespace http://libron.net
4 | // @description Amazon のページから最寄りの図書館の蔵書を検索
5 | // @author Junya Ishihara(http://champierre.com)
6 | // @include https://www.amazon.*
7 | // @include http://www.amazon.*
8 | // @license MIT License(http://en.wikipedia.org/wiki/MIT_License)
9 | // @version 3.0.10
10 | // @updateURL https://userscripts.org/scripts/source/73877.meta.js
11 | // @downloadURL https://userscripts.org/scripts/source/73877.user.js
12 | // @grant GM_setValue
13 | // @grant GM_getValue
14 | // @grant GM_xmlhttpRequest
15 | // ==/UserScript==
16 |
17 | var libron = libron ? libron : new Object();
18 | libron.version = "3.0.10";
19 |
20 | // http://ja.wikipedia.org/wiki/都道府県 の並び順
21 | libron.prefectures = ["北海道",
22 | "青森県","岩手県","宮城県","秋田県","山形県","福島県",
23 | "茨城県","栃木県","群馬県","埼玉県","千葉県","東京都","神奈川県",
24 | "新潟県","富山県","石川県","福井県","山梨県","長野県","岐阜県","静岡県","愛知県",
25 | "三重県","滋賀県","京都府","大阪府","兵庫県","奈良県","和歌山県",
26 | "鳥取県","島根県","岡山県","広島県","山口県",
27 | "徳島県","香川県","愛媛県","高知県",
28 | "福岡県","佐賀県","長崎県","熊本県","大分県","宮崎県","鹿児島県",
29 | "沖縄県"];
30 |
31 | libron.logo = 'data:image/png;base64,'+
32 | 'iVBORw0KGgoAAAANSUhEUgAAAC0AAAAUCAMAAAAusUTNAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJ'+
33 | 'bWFnZVJlYWR5ccllPAAAAYBQTFRFdHJu49/WjouGFBMTzcnB2tfObmxoWllWtbKraGZiwb637erj'+
34 | 'hIJ+ZWRgp6SeXl1ZDAwLl5SPHBwbj42JxcO9ubaxYF5bAgICcG5rraulYmFd1dHJRkVDQkA+ZGJf'+
35 | 'gX97pKKcJiYkkY6JLi4sXFtYNDMxLCsp6eXc6+jg6ebd6OTb7Onh7OjhKSgn7Oni6+ffRENAUlBN'+
36 | '7uvk7eni6uffsa6n6OTc6ubdnpyVPDs5IyMh4NzT6+fgnJmTqaagVVNQ2NTMxcG6ysa/V1ZSmZaQ'+
37 | 'U1JPz8zET05L5ODY5eHY6OXcamhlbWtnSEdFx8S83dnR19TNfnx539zUfnt36ufh5+Td5uPciYeD'+
38 | 'dnVweHZxNzY1y8jBSkhGm5iTIB8enpuW0s/G7uvlpKGb3tvUk5GLlJKM5uLbOTg24N3W4d7XrKmi'+
39 | 'uLWu3drTMTAug4F8vLmzhYN/i4mDop+ZeXhze3l0JCQi5OHZ4t/Yw7+47urkOjo4Pz47hIJ96eXd'+
40 | '6ube6OTb4C1nnAAAAIB0Uk5T////////////////////////////////////////////////////'+
41 | '////////////////////////////////////////////////////////////////////////////'+
42 | '/////////////////////////////////////////wA4BUtnAAAB30lEQVR42rST13PaQBDGBULG'+
43 | 'mEAE2DqIDQ6mnLqsQu8lbuCS3p3E6Z1Up93tv26JJC+Z8dh+yD7tffObvW/39hg4SzD/md45A/3Q'+
44 | '1ACflq7WUcGQTl27wf9Q6O9DL32y79zSH3oYL55M1y6prpPFSAhW4okB+wq4q53bWmcXfP48y6ZL'+
45 | 'ANWCN4yh5tGrHt2PoHOkut+EwUyvhm5V+uhgbSmgKAsFNIzWEJqDgPlF9OjzoiQDpGO0fQ+6xVkK'+
46 | '6zHo17lsSlFFh8uxXxt8McsB5HWPFpoefeEBLqV/1flQAwS/v7A2ixYdXAZoobuQfbFd8wEzrW1u'+
47 | 'eR0IMShp8+prPgIdc8B32yg17ayNXsJ++FBb3/xMPfq5z1ODEyi9xRgyY9lc4dgZjtcanp4cKcC+'+
48 | 'MXq8OXbpzTqKhz6Muz8jlRYfbEWXD8lqUn+Kvn1E2Wog8C54zdlFF0X5CRq5TnbuJ/zCzcd7k8SN'+
49 | 'xERYntfFjU+Xr1Mhe+V9JncnkworJDpJqQTnkzYjEzFsWWHFEHVVtK3vikNIU1fpxqiwp1iPLFus'+
50 | 'YKrqBibPFhRGxqRCKSWYSIRME3nLTbFkHGwzc6pBsewiroolhx6731gSbXv6EH9DLpeP/w1l9ybp'+
51 | 'n1U+EmAAVC9EkhaYTkMAAAAASUVORK5CYII=';
52 |
53 | libron.okIcon = 'data:image/png;base64,'+
54 | 'iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0'+
55 | 'U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAKfSURBVDjLpZPrS1NhHMf9O3bOdmwDCWRE'+
56 | 'IYKEUHsVJBI7mg3FvCxL09290jZj2EyLMnJexkgpLbPUanNOberU5taUMnHZUULMvelCtWF0sW/n'+
57 | '7MVMEiN64AsPD8/n83uucQDi/id/DBT4Dolypw/qsz0pTMbj/WHpiDgsdSUyUmeiPt2+V7SrIM+b'+
58 | 'Sss8ySGdR4abQQv6lrui6VxsRonrGCS9VEjSQ9E7CtiqdOZ4UuTqnBHO1X7YXl6Daa4yGq7vWO1D'+
59 | '40wVDtj4kWQbn94myPGkCDPdSesczE2sCZShwl8CzcwZ6NiUs6n2nYX99T1cnKqA2EKui6+TwphA'+
60 | '5k4yqMayopU5mANV3lNQTBdCMVUA9VQh3GuDMHiVcLCS3J4jSLhCGmKCjBEx0xlshjXYhApfMZRP'+
61 | '5CyYD+UkG08+xt+4wLVQZA1tzxthm2tEfD3JxARH7QkbD1ZuozaggdZbxK5kAIsf5qGaKMTY2lAU'+
62 | '/rH5HW3PLsEwUYy+YCcERmIjJpDcpzb6l7th9KtQ69fi09ePUej9l7cx2DJbD7UrG3r3afQHOyCo'+
63 | '+V3QQzE35pvQvnAZukk5zL5qRL59jsKbPzdheXoBZc4saFhBS6AO7V4zqCpiawuptwQG+UAa7Ct3'+
64 | 'UT0hh9p9EnXT5Vh6t4C22QaUDh6HwnECOmcO7K+6kW49DKqS2DrEZCtfuI+9GrNHg4fMHVSO5kE7'+
65 | 'nAPVkAxKBxcOzsajpS4Yh4ohUPPWKTUh3PaQEptIOr6BiJjcZXCwktaAGfrRIpwblqOV3YKdhfXO'+
66 | 'IvBLeREWpnd8ynsaSJoyESFphwTtfjN6X1jRO2+FxWtCWksqBApeiFIR9K6fiTpPiigDoadqCEag'+
67 | '5YUFKl6Yrciw0VOlhOivv/Ff8wtn0KzlebrUYwAAAABJRU5ErkJggg==';
68 |
69 | libron.ngIcon = 'data:image/png;base64,'+
70 | 'iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0'+
71 | 'U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHdSURBVDjLpZNraxpBFIb3a0ggISmmNISW'+
72 | 'XmOboKihxpgUNGWNSpvaS6RpKL3Ry//Mh1wgf6PElaCyzq67O09nVjdVlJbSDy8Lw77PmfecMwZg'+
73 | '/I/GDw3DCo8HCkZl/RlgGA0e3Yfv7+DbAfLrW+SXOvLTG+SHV/gPbuMZRnsyIDL/OASziMxkkKkU'+
74 | 'QTJJsLaGn8/iHz6nd+8mQv87Ahg2H9Th/BxZqxEkEgSrq/iVCvLsDK9awtvfxb2zjD2ARID+lVVl'+
75 | 'babTgWYTv1rFL5fBUtHbbeTJCb3EQ3ovCnRC6xAgzJtOE+ztheYIEkqbFaS3vY2zuIj77AmtYYDu'+
76 | 'sPy8/zuvunJkDKXM7tYWTiyGWFjAqeQnAD6+7ueNx/FLpRGAru7mcoj5ebqzszil7DggeF/DX1nB'+
77 | 'N82rzPqrzbRayIsLhJqMPT2N83Sdy2GApwFqRN7jFPL0tF+10cDd3MTZ2AjNUkGCoyO6y9cRxfQo'+
78 | 'wFUbpufr1ct4ZoHg+Dg067zduTmEbq4yi/UkYidDe+kaTcP4ObJIajksPd/eyx3c+N2rvPbMDPbU'+
79 | 'FPZSLKzcGjKPrbJaDsu+dQO3msfZzeGY2TCvKGYQhdSYeeJjUt21dIcjXQ7U7Kv599f4j/oF55W4'+
80 | 'g/2e3b8AAAAASUVORK5CYII=';
81 |
82 | libron.loadingIcon = 'data:image/gif;base64,'+
83 | 'R0lGODlhEAAQAPIAAP///wAAAMLCwkJCQgAAAGJiYoKCgpKSkiH/C05FVFNDQVBFMi4wAwEAAAAh'+
84 | '/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAAEAAQAAADMwi63P4wyklr'+
85 | 'E2MIOggZnAdOmGYJRbExwroUmcG2LmDEwnHQLVsYOd2mBzkYDAdKa+dIAAAh+QQJCgAAACwAAAAA'+
86 | 'EAAQAAADNAi63P5OjCEgG4QMu7DmikRxQlFUYDEZIGBMRVsaqHwctXXf7WEYB4Ag1xjihkMZsiUk'+
87 | 'KhIAIfkECQoAAAAsAAAAABAAEAAAAzYIujIjK8pByJDMlFYvBoVjHA70GU7xSUJhmKtwHPAKzLO9'+
88 | 'HMaoKwJZ7Rf8AYPDDzKpZBqfvwQAIfkECQoAAAAsAAAAABAAEAAAAzMIumIlK8oyhpHsnFZfhYum'+
89 | 'CYUhDAQxRIdhHBGqRoKw0R8DYlJd8z0fMDgsGo/IpHI5TAAAIfkECQoAAAAsAAAAABAAEAAAAzII'+
90 | 'unInK0rnZBTwGPNMgQwmdsNgXGJUlIWEuR5oWUIpz8pAEAMe6TwfwyYsGo/IpFKSAAAh+QQJCgAA'+
91 | 'ACwAAAAAEAAQAAADMwi6IMKQORfjdOe82p4wGccc4CEuQradylesojEMBgsUc2G7sDX3lQGBMLAJ'+
92 | 'ibufbSlKAAAh+QQJCgAAACwAAAAAEAAQAAADMgi63P7wCRHZnFVdmgHu2nFwlWCI3WGc3TSWhUFG'+
93 | 'xTAUkGCbtgENBMJAEJsxgMLWzpEAACH5BAkKAAAALAAAAAAQABAAAAMyCLrc/jDKSatlQtScKdce'+
94 | 'CAjDII7HcQ4EMTCpyrCuUBjCYRgHVtqlAiB1YhiCnlsRkAAAOwAAAAAAAAAAAA==';
95 |
96 | libron.calilIcon = 'data:image/png;base64,'+
97 | 'iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A'+
98 | '/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oEBg4oF3uKapIAAACRSURBVDjL'+
99 | 'nVPbDcAgCDyJMziEC9URXaju0C5hPxoMUXzy40UOOFBMzhkAENL7g0WL3hkAoJNgGUMMonc71UsS'+
100 | '0hwrwWxWI4T0NkTtrsxgVmWkjmQFPhnXCiSnSSArcBs9+RKb6362X0GqoBlJa2c4gxrP/KUF5ZN0'+
101 | 'sbQmwWgemjK7SuzOgLfqxKJ3huRqnqzzBwE6Xrqxh9tpAAAAAElFTkSuQmCC';
102 |
103 | // カーリル(https://calil.jp)APIキー
104 | libron.appkey = "73ec9cd9e4b62b65b9549dc173750e9c";
105 |
106 | libron.libraries = {};
107 | libron.libraryNames = {};
108 |
109 | libron.createElement = function(tagName, attributes, content) {
110 | var dom = document.createElement(tagName);
111 | for (var key in attributes) {
112 | dom.setAttribute(key, attributes[key]);
113 | }
114 | if (content) {
115 | dom.textContent = content;
116 | }
117 | return dom;
118 | }
119 |
120 | if (isGreasemonkey()) {
121 | main();
122 | } else {
123 | function onReadyGM(){
124 | main();
125 | }
126 | }
127 |
128 | /*
129 | * メイン
130 | */
131 |
132 | function main() {
133 | if (isSafariExtension()) {
134 | safari.self.addEventListener("message", getResponse, false);
135 | }
136 |
137 | libron.selectedSystemId = GM_getValue("selectedSystemId") ? decodeURIComponent(GM_getValue("selectedSystemId")) : 'Tokyo_Pref';
138 | libron.selectedSystemName = GM_getValue("selectedSystemName") ? decodeURIComponent(GM_getValue("selectedSystemName")) : '東京都立図書館';
139 | libron.selectedPrefecture = GM_getValue("selectedPrefecture") ? decodeURIComponent(GM_getValue("selectedPrefecture")) : '東京都';
140 | libron.univChecked = (GM_getValue("univChecked") === "true") ? true : false;
141 | libron.systemNames = {};
142 |
143 | var href = document.location.href;
144 |
145 | if (parent != self) {
146 | return;
147 | }
148 |
149 | addStyle();
150 | addSelectBox();
151 |
152 | if (isbnOfBookPage(href)) {
153 | addLibraryLinksToBookPage(isbnOfBookPage(href));
154 | } else if (isWishList(href)) {
155 | addLibraryLinksToWishList();
156 | } else if (isbnOfMobileBookPage(href)) {
157 | addLibraryLinksToMobileBookPage(isbnOfMobileBookPage(href));
158 | }
159 | return;
160 | }
161 |
162 | /*
163 | * 書籍リストページ or 書籍単体ページ or ほしい物リスト 判定用
164 | */
165 |
166 | function isBookList(href) {
167 | if ((href.indexOf('/s?') != -1) || (href.indexOf('/s/') != -1) || (href.indexOf('/gp/search') != -1)) {
168 | return true;
169 | }
170 | // 新着ニューリリース http://www.amazon.co.jp/gp/new-releases/books/ref=sv_b_2
171 | if (href.indexOf('/gp/new-releases/') != -1) {
172 | return true;
173 | }
174 | return false;
175 | }
176 |
177 | function isbnOfBookPage(href) {
178 | var matched = href.match(/\/(dp|ASIN|product)\/([\dX]{10})/);
179 | if (matched && matched[2]) {
180 | return matched[2];
181 | }
182 | return false;
183 | }
184 |
185 | function isWishList(href) {
186 | if (href.indexOf("/wishlist") != -1) {
187 | return true;
188 | }
189 | return false;
190 | }
191 |
192 | function isbnOfMobileBookPage(href) {
193 | var matched = href.match(/\/gp\/aw\/d\/([\dX]{10})/);
194 | if (matched && matched[1]) {
195 | return matched[1];
196 | }
197 | return false;
198 | }
199 |
200 | /*
201 | * CSS定義
202 | */
203 |
204 | function addStyle() {
205 | var style = "\
206 | div#libron_select{\
207 | border:1px solid #cbc6bd;\
208 | background:#e8e4db;\
209 | -moz-border-radius:5px;\
210 | -webkit-border-radius:5px;\
211 | font-size:14px;\
212 | padding:7px;\
213 | }\
214 | div#libron_select img{\
215 | vertical-align:-5px;\
216 | }\
217 | div#libron_select span#title{\
218 | font-weight:bold;\
219 | color:#e47911;\
220 | }\
221 | div#libron_select_box{\
222 | display:none;\
223 | }\
224 | div#libron_select_box select,button{\
225 | margin-left:10px;\
226 | }\
227 | div#libron_select_box a{\
228 | margin-left:3px;\
229 | }\
230 | div#libron_select_box label{\
231 | display:inline;\
232 | }\
233 | div#libron_select_box #loading-message{\
234 | margin-left:10px;\
235 | color:#e47911;\
236 | padding-right:70px;\
237 | }\
238 | .libron_left{\
239 | float:left;\
240 | }\
241 | .libron_right{\
242 | float:right;\
243 | }\
244 | .libron_gray{\
245 | color:#666666;\
246 | }\
247 | .libron_clear{\
248 | clear:both;\
249 | }\
250 | div.libron_link_div{\
251 | display:table;\
252 | width:300px;\
253 | padding:7px;\
254 | border:1px solid #cbc6bd;\
255 | background:#e8e4db;\
256 | -moz-border-radius:5px;\
257 | -webkit-border-radius:5px;\
258 | font-size:12px;\
259 | margin-bottom:10px;\
260 | }\
261 | div.libron_link_div div{\
262 | padding:0 !important;\
263 | margin:0 !important;\
264 | }\
265 | div.libron_link_div div.calil_link{\
266 | margin-top:5px !important;\
267 | }\
268 | div.libron_link_div img{\
269 | vertical-align:middle;\
270 | }\
271 | span#libron_news{\
272 | margin-left:10px;\
273 | }\
274 | ";
275 | var head = document.getElementsByTagName('head')[0];
276 | var element = head.appendChild(window.document.createElement('style'));
277 | element.type = "text/css";
278 | element.textContent = style;
279 | }
280 |
281 | /*
282 | * ページ上部に図書館選択ボックスを表示
283 | */
284 |
285 | function addSelectBox() {
286 | var div = libron.createElement("div", {id: "libron_select"}, null);
287 | var titleDiv = libron.createElement("div", {class: "libron_left"});
288 | var titleSpan = libron.createElement("span", {id: "title"}, " ver." + libron.version);
289 | var logoImg = libron.createElement("img", {src: libron.logo}, null);
290 | var infoDiv = libron.createElement("div", {id: "libron_info", class: "libron_right"});
291 | var currentLibrary = libron.createElement("span", {class: "libron_gray"}, "[" + libron.selectedPrefecture + "]" + libron.selectedSystemName + "で検索 ");
292 | var showLink = libron.createElement("a", {href: "javascript:void(0);"}, "変更");
293 | var newsSpan = libron.createElement("span", {id: "libron_news", class: "libron_gray"}, "");
294 | showLink.addEventListener("click", showSelectBox, false);
295 |
296 | titleDiv.appendChild(logoImg);
297 | titleDiv.appendChild(titleSpan);
298 | titleDiv.appendChild(newsSpan);
299 |
300 | infoDiv.appendChild(currentLibrary);
301 | infoDiv.appendChild(showLink);
302 |
303 | var univCheckBox = document.createElement("input");
304 | univCheckBox.type = "checkbox";
305 | univCheckBox.id = "univ";
306 | univCheckBox.checked = libron.univChecked;
307 |
308 | var univCheckBoxLabel = libron.createElement("label", {for: "univ", class: "libron_gray"}, "大学図書館も表示");
309 |
310 | if (isSafariExtension()) {
311 | safari.self.tab.dispatchMessage("getNews");
312 | } else {
313 | GM_xmlhttpRequest({
314 | method: "GET",
315 | url: "http://libron.net/news.txt",
316 | onload: function(response) {
317 | newsSpan.innerHTML = response.responseText;
318 | }
319 | });
320 | }
321 |
322 | univCheckBox.addEventListener("change", function(){
323 | selectBoxDiv.replaceChild(loadingMessage, selectBoxDiv.childNodes[3]);
324 | libron.univChecked = univCheckBox.checked;
325 | updateLibrarySelectBox(selectBoxDiv, prefectureSelect.value, libron.univChecked);
326 | }, false);
327 |
328 | var prefectureSelect = libron.createElement("select", {id: "prefecture_select"}, null);
329 |
330 | for (var i in libron.prefectures) {
331 | var option = document.createElement('option');
332 | option.value = libron.prefectures[i];
333 | option.textContent = libron.prefectures[i];
334 | if (libron.prefectures[i] == libron.selectedPrefecture) {
335 | option.selected = true;
336 | }
337 | prefectureSelect.appendChild(option);
338 | }
339 |
340 | var loadingMessage = libron.createElement("span", {id: "loading-message"}, "データ取得中...");
341 | var btn = libron.createElement("button", null, "保存");
342 | var hideLink = libron.createElement("a", {href: "javascript:void(0);"}, "キャンセル");
343 | hideLink.addEventListener("click", hideSelectBox, false);
344 | var selectBoxDiv = libron.createElement("div", {id: "libron_select_box", class: "libron_right"}, null);
345 |
346 | selectBoxDiv.appendChild(univCheckBox);
347 | selectBoxDiv.appendChild(univCheckBoxLabel);
348 | selectBoxDiv.appendChild(prefectureSelect);
349 | selectBoxDiv.appendChild(loadingMessage);
350 | selectBoxDiv.appendChild(btn);
351 | selectBoxDiv.appendChild(hideLink);
352 |
353 | updateLibrarySelectBox(selectBoxDiv, libron.selectedPrefecture, libron.univChecked);
354 |
355 | prefectureSelect.addEventListener("change", function(){
356 | selectBoxDiv.replaceChild(loadingMessage, selectBoxDiv.childNodes[3]);
357 | libron.selectedPrefecture = prefectureSelect.value;
358 | updateLibrarySelectBox(selectBoxDiv, prefectureSelect.value, libron.univChecked);
359 | }, false);
360 |
361 | var clearDiv = libron.createElement("div", {class: "libron_clear"}, null);
362 |
363 | div.appendChild(titleDiv);
364 | div.appendChild(infoDiv);
365 | div.appendChild(selectBoxDiv);
366 | div.appendChild(clearDiv);
367 |
368 | document.body.insertBefore(div, document.body.childNodes[0]);
369 |
370 | btn.addEventListener("click", function(){
371 | var options = {
372 | 'prefecture': prefectureSelect.value,
373 | 'systemid': selectBoxDiv.childNodes[3].value,
374 | 'systemname': libron.systemNames[selectBoxDiv.childNodes[3].value],
375 | 'univChecked': univCheckBox.checked
376 | };
377 | saveSelection(options);
378 | window.location.reload();
379 | }, false);
380 | }
381 |
382 | /*
383 | * 図書館選択ボックス関連
384 | */
385 |
386 | function showSelectBox() {
387 | document.getElementById('libron_info').style.display = 'none';
388 | document.getElementById('libron_select_box').style.display = 'block';
389 | document.getElementById('libron_news').style.display = 'none';
390 | return false;
391 | }
392 |
393 | function hideSelectBox() {
394 | document.getElementById('libron_info').style.display = 'block';
395 | document.getElementById('libron_select_box').style.display = 'none';
396 | document.getElementById('libron_news').style.display = 'span';
397 | return false;
398 | }
399 |
400 | function createLibraryNames(prefecture, libraries, cities) {
401 | var smallMediumLibrariesObject = {};
402 | var smallMediumLibraries = [];
403 | var largeLibraries = [];
404 | var univLibraries = [];
405 | var otherLibraries = [];
406 |
407 | for (var i in libraries[prefecture]) {
408 | var library = libraries[prefecture][i];
409 | var data = {'systemid':library.systemid, 'systemname':library.systemname};
410 |
411 | if ((library.category == "SMALL") || (library.category == "MEDIUM")) {
412 | if (smallMediumLibrariesObject[library.systemname]) {
413 | smallMediumLibrariesObject[library.systemname].push(data);
414 | } else {
415 | smallMediumLibrariesObject[library.systemname] = [data];
416 | }
417 | } else if (library.category == "LARGE") {
418 | largeLibraries.push(data);
419 | } else if (library.category == "UNIV") {
420 | univLibraries.push(data);
421 | } else {
422 | otherLibraries.push(data);
423 | }
424 | }
425 |
426 | var kanas = ['あ','か','さ','た','な','は','ま','や','ら','わ'];
427 | for (var i in kanas) {
428 | var kana = kanas[i];
429 | if (cities[kana]) {
430 | for (var j in cities[kana]){
431 | city_name = cities[kana][j];
432 | if (smallMediumLibrariesObject[prefecture + city_name]) {
433 | smallMediumLibraries = smallMediumLibraries.concat(smallMediumLibrariesObject[prefecture + city_name]);
434 | }
435 | }
436 | }
437 | }
438 |
439 | var libraryNamesArray = [];
440 |
441 | for (var i in smallMediumLibraries) {
442 | var smallMediumLibrary = smallMediumLibraries[i];
443 | if (libron.systemNames[smallMediumLibrary.systemid]) {
444 | continue;
445 | }
446 | smallMediumLibrary['group'] = '図書館(地域)';
447 | libraryNamesArray.push(smallMediumLibrary);
448 | libron.systemNames[smallMediumLibrary.systemid] = smallMediumLibrary.systemname;
449 | }
450 |
451 | for (var i in largeLibraries) {
452 | var largeLibrary = largeLibraries[i];
453 | if (libron.systemNames[largeLibrary.systemid]) {
454 | continue;
455 | }
456 | largeLibrary['group'] = '図書館(広域)';
457 | libraryNamesArray.push(largeLibrary);
458 | libron.systemNames[largeLibrary.systemid] = largeLibrary.systemname;
459 | }
460 |
461 | for (var i in univLibraries) {
462 | var univLibrary = univLibraries[i];
463 | if (libron.systemNames[univLibrary.systemid]) {
464 | continue;
465 | }
466 | univLibrary['group'] = '図書館(大学)';
467 | libraryNamesArray.push(univLibrary);
468 | libron.systemNames[univLibrary.systemid] = univLibrary.systemname;
469 | }
470 |
471 | for (var i in otherLibraries) {
472 | var otherLibrary = otherLibraries[i];
473 | if (libron.systemNames[otherLibrary.systemid]) {
474 | continue;
475 | }
476 | otherLibrary['group'] = '移動・その他';
477 | libraryNamesArray.push(otherLibrary);
478 | libron.systemNames[otherLibrary.systemid] = otherLibrary.systemname;
479 | }
480 | return libraryNamesArray;
481 | }
482 |
483 | function updateLibrarySelectBox(selectBoxDiv, prefecture, univ) {
484 | if (!univ) univ = false;
485 | if (libron.libraryNames[prefecture]) {
486 | selectBoxDiv.replaceChild(createLibrarySelectBox(libron.libraryNames[prefecture], univ), selectBoxDiv.childNodes[3]);
487 | } else {
488 | var url = "https://api.calil.jp/library?appkey=" + encodeURIComponent(libron.appkey) + "&pref=" + encodeURIComponent(prefecture) + "&format=json";
489 |
490 | if (isSafariExtension()) {
491 | safari.self.tab.dispatchMessage("retrieveLibraryInfo", [url, prefecture, univ]);
492 | } else {
493 | GM_xmlhttpRequest({
494 | method: "GET",
495 | url: url,
496 | onload: function(response){
497 | GM_xmlhttpRequest({
498 | method: "GET",
499 | url: "https://calil.jp/city_list",
500 | onload: function(city_list_response) {
501 | var city_list_match = city_list_response.responseText.match(/^loadcity\((.*)\);(\n)*$/);
502 | var cities = JSON.parse(city_list_match[1]);
503 | var match = response.responseText.match(/^callback\((.*)\);(\n)*$/);
504 | libron.libraries[prefecture] = JSON.parse(match[1]);
505 | libron.libraryNames[prefecture] = createLibraryNames(prefecture, libron.libraries, cities[prefecture]);
506 | selectBoxDiv.replaceChild(createLibrarySelectBox(libron.libraryNames[prefecture], univ), selectBoxDiv.childNodes[3]);
507 | }
508 | });
509 | }
510 | });
511 | }
512 | }
513 | }
514 |
515 | function createLibrarySelectBox(libraryNames, univ) {
516 | var select = document.createElement("select");
517 | var groups;
518 | if (univ) {
519 | groups = ['図書館(地域)', '図書館(広域)', '図書館(大学)', '移動・その他'];
520 | } else {
521 | groups = ['図書館(地域)', '図書館(広域)', '移動・その他'];
522 | }
523 |
524 | var optGroups = {};
525 | for (var i in groups) {
526 | optGroups[groups[i]] = document.createElement('optgroup');
527 | optGroups[groups[i]].label = groups[i];
528 | }
529 |
530 | for (var i in libraryNames) {
531 | var option = document.createElement('option');
532 | option.value = libraryNames[i]['systemid'];
533 | option.textContent = libraryNames[i]['systemname'];
534 |
535 | if (libraryNames[i]['systemid'] == libron.selectedSystemId) {
536 | option.selected = true;
537 | }
538 |
539 | if (optGroups[libraryNames[i]['group']]) {
540 | optGroups[libraryNames[i]['group']].appendChild(option);
541 | }
542 | }
543 | for (var i in groups) {
544 | if (optGroups[groups[i]].childNodes.length > 0) {
545 | select.appendChild(optGroups[groups[i]]);
546 | }
547 | }
548 | return select;
549 | }
550 |
551 | function saveSelection(options){
552 | GM_setValue("selectedPrefecture", encodeURIComponent(options.prefecture));
553 | GM_setValue("selectedSystemId", encodeURIComponent(options.systemid));
554 | GM_setValue("selectedSystemName", encodeURIComponent(options.systemname));
555 | GM_setValue("univChecked", options.univChecked === true ? "true" : "false");
556 | }
557 |
558 | /*
559 | * Amazonの各ページに応じて、図書館リンクを表示
560 | */
561 |
562 | function addLibraryLinksToBookList(){
563 | var objects = document.getElementsByTagName('h3');
564 | var isbns = [];
565 | var target_objects = [];
566 |
567 | outerloop:
568 | for (var i = 0; i < objects.length; i++) {
569 | var object = objects[i];
570 | for (var j = 0; j < object.parentNode.childNodes.length; j++) {
571 | if ((object.parentNode.childNodes[j].className == 'libron_link_div') || (object.parentNode.childNodes[j].className == 'libron_loading_icon_div')){
572 | continue outerloop;
573 | }
574 | }
575 |
576 | if ((object.className.indexOf("productTitle") != -1) || (object.className.indexOf("title") != -1) || (object.className.indexOf("fixed-line") != -1)){
577 | var link = object.getElementsByTagName('a')[0];
578 | if (link) {
579 | var matched = link.href.match(/\/dp\/([\dX]{10})\/ref/);
580 | if (matched && matched[1]) {
581 | var isbn = matched[1];
582 | isbns.push(encodeURIComponent(isbn));
583 | target_objects.push(object);
584 | }
585 | }
586 | }
587 | }
588 |
589 | if (isbns.length > 0) {
590 | var url = "https://api.calil.jp/check?appkey=" + encodeURIComponent(libron.appkey) + "&isbn=" + isbns.join(',') + "&systemid=" + encodeURIComponent(libron.selectedSystemId) + "&format=json";
591 | addLoadingIcon(url, target_objects, isbns);
592 | }
593 | }
594 |
595 | function addLibraryLinksToBookPage(isbn){
596 | var btAsinTitleDiv = parent.document.getElementById('btAsinTitle');
597 | var url = "https://api.calil.jp/check?appkey=" + encodeURIComponent(libron.appkey) + "&isbn=" + encodeURIComponent(isbn) + "&systemid=" + encodeURIComponent(libron.selectedSystemId) + "&format=json";
598 | if (btAsinTitleDiv) {
599 | var div = btAsinTitleDiv.parentNode;
600 | addLoadingIcon(url, [div], [isbn]);
601 | } else {
602 | var booksTitleDiv = document.getElementById('productTitle');
603 | if (booksTitleDiv) {
604 | var div = booksTitleDiv.parentNode;
605 | addLoadingIcon(url, [div], [isbn]);
606 | }
607 | }
608 | }
609 |
610 | function addLibraryLinksToWishList(){
611 | var isbns = [];
612 | var target_objects = [];
613 | var objects = parent.document.evaluate("//a[contains(@id, 'itemName')]", parent.document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
614 | for (var i = 0; i < objects.snapshotLength; i++) {
615 | var object = objects.snapshotItem(i);
616 | if (object) {
617 | var matched = object.href.match(/\/dp\/([\dX]{10})\/ref/);
618 | if (matched && matched[1]) {
619 | var isbn = matched[1];
620 | isbns.push(encodeURIComponent(isbn));
621 | target_objects.push(object.parentNode);
622 | }
623 | }
624 | }
625 |
626 | if (isbns.length > 0) {
627 | var url = "https://api.calil.jp/check?appkey=" + encodeURIComponent(libron.appkey) + "&isbn=" + isbns.join(',') + "&systemid=" + encodeURIComponent(libron.selectedSystemId) + "&format=json";
628 | addLoadingIcon(url, target_objects, isbns);
629 | }
630 | }
631 |
632 | function addLibraryLinksToMobileBookPage(isbn){
633 | var hrs = parent.document.getElementsByTagName('hr');
634 | if (hrs.length > 0) {
635 | var hr = hrs[0];
636 | var url = "https://api.calil.jp/check?appkey=" + encodeURIComponent(libron.appkey) + "&isbn=" + encodeURIComponent(isbn) + "&systemid=" + libron.selectedSystemId + "&format=json";
637 | addLoadingIcon(url, [hr], [isbn]);
638 | }
639 | }
640 |
641 | function addLoadingIcon(url, objects, isbns) {
642 |
643 | // callback function
644 | var checkLibrary = isSafariExtension() ?
645 | function(url){
646 | safari.self.tab.dispatchMessage("checkLibrary", [url, libron.appkey]);
647 | }
648 | :
649 | function(url) {
650 | GM_xmlhttpRequest({
651 | method: "GET",
652 | url: url,
653 | onload: function(response){
654 | var match = response.responseText.match(/^callback\((.*)\);$/);
655 | var json = JSON.parse(match[1]);
656 | var cont = json["continue"];
657 | if (cont == 0) {
658 | replaceWithLibraryLink(json);
659 | } else {
660 | //途中なので再度検索をおこなう
661 | var session = json["session"];
662 | if (session.length > 0) {
663 | var new_url = "https://api.calil.jp/check?appkey=" + encodeURIComponent(libron.appkey) + "&session=" + encodeURIComponent(session) + "&format=json";
664 | setTimeout(function(){
665 | checkLibrary(new_url);
666 | }, 2000);
667 | }
668 | }
669 | }
670 | });
671 | };
672 |
673 | for (var i = 0; i < objects.length; i++) {
674 | var object = objects[i];
675 | var div = libron.createElement("div", {class: "libron_link_div", "data-isbn": isbns[i]}, null);
676 | var searchingSpan = libron.createElement("span", {class: "libron_gray"}, "図書館を検索中 ");
677 | var loadingIconImg = libron.createElement("img", {src: libron.loadingIcon}, null);
678 | div.appendChild(searchingSpan);
679 | div.appendChild(loadingIconImg);
680 | object.parentNode.insertBefore(div, object.nextSibling);
681 | }
682 | checkLibrary(url);
683 | }
684 |
685 | function replaceWithLibraryLink(json){
686 | var divs = document.getElementsByClassName('libron_link_div');
687 | for (var i = 0; i < divs.length; i++) {
688 | var div = divs[i];
689 | var isbn = div.getAttribute("data-isbn");
690 | var status = json["books"][isbn][libron.selectedSystemId]["status"];
691 | var libkey;
692 | var calil_library_links = [];
693 | var libLink;
694 |
695 | var calilLink = libron.createElement("div", {class: "calil_link"}, null);
696 | var raquo = document.createTextNode("» ");
697 | var calilLinkAnchor = libron.createElement("a", {href: "https://calil.jp/book/" + isbn, target:"_blank"}, "他の図書館で検索する(カーリル)");
698 | var space = document.createTextNode(" ");
699 | var calilIconImg = libron.createElement("img", {src: libron.calilIcon}, null);
700 | calilLink.appendChild(raquo);
701 | calilLink.appendChild(calilLinkAnchor);
702 | calilLink.appendChild(space);
703 | calilLink.appendChild(calilIconImg);
704 |
705 | if (div.hasChildNodes()) {
706 | while(div.childNodes.length >= 1) {
707 | div.removeChild(div.firstChild);
708 | }
709 | }
710 |
711 | if (status && status == "Error") {
712 | libLink = document.createElement("div");
713 | var ngIconImg = libron.createElement("img", {src: libron.ngIcon}, null);
714 | var errorMsg = document.createTextNode("エラーが発生しました ");
715 | libLink.appendChild(errorMsg);
716 | libLink.appendChild(ngIconImg);
717 | div.appendChild(libLink);
718 | div.appendChild(calilLink);
719 | } else {
720 | libkey = json["books"][isbn][libron.selectedSystemId]["libkey"];
721 | for (var key in libkey) {
722 | var calil_library_link = libron.createElement("a", {href: "https://calil.jp/library/search?s=" + encodeURIComponent(libron.selectedSystemId) + "&k=" + encodeURIComponent(key), target: "_blank"}, key + "(" + libkey[key] + ")");
723 | calil_library_links.push(calil_library_link);
724 | }
725 | if (calil_library_links.length > 0) {
726 | var reserveurl = json["books"][isbn][libron.selectedSystemId]["reserveurl"] + "&asin=" + encodeURIComponent(isbn);
727 | if (reserveurl) {
728 | libLink = document.createElement("div");
729 | var raquo = document.createTextNode("» ");
730 | var reserveUrlAnchor = libron.createElement("a", {"href":reserveurl, "target":"_blank"}, libron.selectedSystemName + "で予約する");
731 | var space = document.createTextNode(" ");
732 | var okIconImg = libron.createElement("img", {src: libron.okIcon}, null);
733 | libLink.appendChild(raquo);
734 | libLink.appendChild(reserveUrlAnchor);
735 | libLink.appendChild(space);
736 | libLink.appendChild(okIconImg);
737 | div.appendChild(libLink);
738 | } else {
739 | libLink = libron.createElement("div", {class: "libron_gray"}, null);
740 | var okMsg = document.createTextNode(libron.selectedSystemName + "に蔵書あり ");
741 | var okIconImg = libron.createElement("img", {src: libron.okIcon}, null);
742 | var space = document.createTextNode(" ");
743 | libLink.appendChild(okMsg);
744 | libLink.appendChild(okIconImg);
745 | libLink.appendChild(space);
746 | for (var i = 0; i < calil_library_links.length; i++) {
747 | libLink.appendChild(calil_library_links[i]);
748 | if (i !== calil_library_links.length - 1) {
749 | var hyphen = document.createTextNode(" - ");
750 | libLink.appendChild(hyphen);
751 | }
752 | }
753 | div.appendChild(libLink);
754 | }
755 | } else {
756 | libLink = libron.createElement("div", {class: "libron_gray"}, null);
757 | var notFoundMsg = document.createTextNode(libron.selectedSystemName + "には見つかりません ");
758 | var ngIconImg = libron.createElement("img", {src: libron.ngIcon}, null);
759 | libLink.appendChild(notFoundMsg);
760 | libLink.appendChild(ngIconImg);
761 | div.appendChild(libLink);
762 | div.appendChild(calilLink);
763 | }
764 | }
765 | }
766 | }
767 |
768 | // *Safari Extension Specific*
769 | function GM_setValue(key, value) {
770 | localStorage.setItem(key, value);
771 | }
772 |
773 | // *Safari Extension Specific*
774 | function GM_getValue(key) {
775 | return localStorage.getItem(key);
776 | }
777 |
778 | // *Safari Extension Specific*
779 | function getResponse(theMessageEvent) {
780 | if (theMessageEvent.name === "libraryInfoResponse") {
781 | var responseText = (theMessageEvent.message)[0];
782 | var cityListResponseText = (theMessageEvent.message)[1];
783 | var prefecture = (theMessageEvent.message)[2];
784 | var univ = (theMessageEvent.message)[3];
785 | var city_list_match = cityListResponseText.match(/^loadcity\((.*)\);(\n)*$/);
786 | var cities = JSON.parse(city_list_match[1]);
787 | var match = responseText.match(/^callback\((.*)\);(\n)*$/);
788 |
789 | libron.libraries[prefecture] = JSON.parse(match[1]);
790 | libron.libraryNames[prefecture] = createLibraryNames(prefecture, libron.libraries, cities[prefecture]);
791 |
792 | var selectBoxDiv = document.getElementById("libron_select_box");
793 | if (selectBoxDiv) {
794 | selectBoxDiv.replaceChild(createLibrarySelectBox(libron.libraryNames[prefecture], univ), selectBoxDiv.childNodes[3]);
795 | }
796 | } else if (theMessageEvent.name === "checkLibraryResponse") {
797 | var responseText = (theMessageEvent.message)[0];
798 | var match = responseText.match(/^callback\((.*)\);(\n)*$/);
799 | var json = JSON.parse(match[1]);
800 | replaceWithLibraryLink(json);
801 | } else if (theMessageEvent.name === "getNewsResponse") {
802 | var responseText = (theMessageEvent.message)[0];
803 | var newsSpan = document.getElementById("libron_news");
804 | newsSpan.innerHTML = responseText;
805 | }
806 | }
807 |
808 | function isGreasemonkey() {
809 | return (typeof isChromeExtension == "undefined");
810 | }
811 |
812 | function isSafariExtension() {
813 | return (typeof safari == 'object') && (typeof safari.extension == 'object');
814 | }
815 |
--------------------------------------------------------------------------------
/html/apple-touch-icon-precomposed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/apple-touch-icon-precomposed.png
--------------------------------------------------------------------------------
/html/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/apple-touch-icon.png
--------------------------------------------------------------------------------
/html/chrome.html:
--------------------------------------------------------------------------------
1 | 
2 |
3 |
7 |
8 |
9 |

10 |
11 |
12 |

13 |
14 |
15 |
16 |
Libron をインストールします
17 |
以下のリンク先より、Libron の Chrome Extension 版をインストールします。
18 | » Libron - Google Chrome extension gallery
19 |

20 |
21 |
Libron を拡張機能のバーに固定する
22 |
Chrome のメニュー右端の方に表示されている拡張機能のアイコン(パズルのピースの形)をクリックし、Libron の右横のピンのアイコンをクリックして拡張機能のバーに固定して常に Libron のアイコンが表示されるようにしておきます。
23 |

24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/html/contact.html:
--------------------------------------------------------------------------------
1 |
2 | Libronに関するご意見/要望/バグ報告は、こちらからお願いいたします。
3 | 開発者への応援メッセージも大歓迎です!
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/html/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/favicon.ico
--------------------------------------------------------------------------------
/html/firefox.html:
--------------------------------------------------------------------------------
1 | 
2 |
3 |
7 |
8 |
9 |
10 |

11 |
12 |
13 |
Tampermonkeyをインストールします
14 |
LibronをFirefoxで利用するには、まずGreasemonkey互換のTampermonkeyというAdd-onをインストールする必要があります。
15 |
以下のリンク先よりインストールして下さい。
16 |
» Tampermonkey :: Add-ons for Firefox
17 |
18 |
Libronをインストールします
19 |
次に以下のリンク先より、Libron Greasemonkey版をインストールします。
20 |
» Libron for Greasemonkey
21 |
上記リンクをクリックすると、Tampermonkeyの画面が表示され、インストールの確認を求められます。「インストール」をクリックしてLibronをインストールします。
22 |

23 |
24 |
クロスドメインアクセスの許可
25 |
Libronをインストールできたら、Amazonのページ(https://www.amazon.co.jp/)にアクセスします。
26 |
Libronの最新情報と蔵書検索の結果を取得するためLibronはlibron.netとapi.calil.jpにアクセスする必要があります。2つのサーバーに対するクロスドメインアクセスの許可を求める画面が表示されるので、両方とも「Always allow domain」のボタンをクリックして許可してください。
27 |
以上でLibronをFirefoxで使う準備は完了です。
28 |

29 |

30 |
31 |
32 |
--------------------------------------------------------------------------------
/html/googlebea30a9b808e4684.html:
--------------------------------------------------------------------------------
1 | google-site-verification: googlebea30a9b808e4684.html
--------------------------------------------------------------------------------
/html/images/application.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/application.png
--------------------------------------------------------------------------------
/html/images/banner_nanapi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/banner_nanapi.png
--------------------------------------------------------------------------------
/html/images/bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/bg.png
--------------------------------------------------------------------------------
/html/images/btn_blog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/btn_blog.png
--------------------------------------------------------------------------------
/html/images/btn_blog_over.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/btn_blog_over.png
--------------------------------------------------------------------------------
/html/images/btn_gotoappstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/btn_gotoappstore.png
--------------------------------------------------------------------------------
/html/images/btn_hatenapoint.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/btn_hatenapoint.png
--------------------------------------------------------------------------------
/html/images/btn_hatenapoint_over.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/btn_hatenapoint_over.png
--------------------------------------------------------------------------------
/html/images/btn_iphoneapp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/btn_iphoneapp.png
--------------------------------------------------------------------------------
/html/images/btn_twitter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/btn_twitter.png
--------------------------------------------------------------------------------
/html/images/btn_twitter_over.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/btn_twitter_over.png
--------------------------------------------------------------------------------
/html/images/buy-from-tan.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/buy-from-tan.gif
--------------------------------------------------------------------------------
/html/images/calil_banner.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/calil_banner.gif
--------------------------------------------------------------------------------
/html/images/divider.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/divider.png
--------------------------------------------------------------------------------
/html/images/h2_donation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/h2_donation.png
--------------------------------------------------------------------------------
/html/images/h2_understand.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/h2_understand.png
--------------------------------------------------------------------------------
/html/images/h2bg_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/h2bg_1.png
--------------------------------------------------------------------------------
/html/images/h2bg_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/h2bg_2.png
--------------------------------------------------------------------------------
/html/images/h2bg_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/h2bg_3.png
--------------------------------------------------------------------------------
/html/images/h2bg_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/h2bg_4.png
--------------------------------------------------------------------------------
/html/images/h2bg_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/h2bg_5.png
--------------------------------------------------------------------------------
/html/images/h2bg_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/h2bg_6.png
--------------------------------------------------------------------------------
/html/images/h2bg_7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/h2bg_7.png
--------------------------------------------------------------------------------
/html/images/h2bg_8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/h2bg_8.png
--------------------------------------------------------------------------------
/html/images/h2bg_9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/h2bg_9.png
--------------------------------------------------------------------------------
/html/images/ico_bookmark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/ico_bookmark.png
--------------------------------------------------------------------------------
/html/images/ico_external.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/ico_external.png
--------------------------------------------------------------------------------
/html/images/images-home/btn_dl_chrome.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-home/btn_dl_chrome.png
--------------------------------------------------------------------------------
/html/images/images-home/btn_dl_chrome_over.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-home/btn_dl_chrome_over.png
--------------------------------------------------------------------------------
/html/images/images-home/btn_dl_firefox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-home/btn_dl_firefox.png
--------------------------------------------------------------------------------
/html/images/images-home/btn_dl_firefox_addon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-home/btn_dl_firefox_addon.png
--------------------------------------------------------------------------------
/html/images/images-home/btn_dl_firefox_addon_over.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-home/btn_dl_firefox_addon_over.png
--------------------------------------------------------------------------------
/html/images/images-home/btn_dl_firefox_over.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-home/btn_dl_firefox_over.png
--------------------------------------------------------------------------------
/html/images/images-home/btn_dl_iphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-home/btn_dl_iphone.png
--------------------------------------------------------------------------------
/html/images/images-home/btn_dl_iphone_over.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-home/btn_dl_iphone_over.png
--------------------------------------------------------------------------------
/html/images/images-home/btn_dl_iphone_soon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-home/btn_dl_iphone_soon.png
--------------------------------------------------------------------------------
/html/images/images-home/btn_dl_safari.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-home/btn_dl_safari.png
--------------------------------------------------------------------------------
/html/images/images-home/btn_dl_safari_over.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-home/btn_dl_safari_over.png
--------------------------------------------------------------------------------
/html/images/images-home/btn_howtoinstall.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-home/btn_howtoinstall.png
--------------------------------------------------------------------------------
/html/images/images-home/btn_howtoinstall_over.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-home/btn_howtoinstall_over.png
--------------------------------------------------------------------------------
/html/images/images-home/btn_howtouse.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-home/btn_howtouse.png
--------------------------------------------------------------------------------
/html/images/images-home/btn_howtouse_over.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-home/btn_howtouse_over.png
--------------------------------------------------------------------------------
/html/images/images-home/btn_install.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-home/btn_install.png
--------------------------------------------------------------------------------
/html/images/images-home/btn_install_over.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-home/btn_install_over.png
--------------------------------------------------------------------------------
/html/images/images-home/reviewposter_header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-home/reviewposter_header.png
--------------------------------------------------------------------------------
/html/images/images-home/visual_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-home/visual_0.png
--------------------------------------------------------------------------------
/html/images/images-home/visual_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-home/visual_1.png
--------------------------------------------------------------------------------
/html/images/images-home/visual_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-home/visual_2.png
--------------------------------------------------------------------------------
/html/images/images-home/visual_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-home/visual_3.png
--------------------------------------------------------------------------------
/html/images/images-home/visual_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-home/visual_bg.png
--------------------------------------------------------------------------------
/html/images/images-subpage/btn_firefox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-subpage/btn_firefox.png
--------------------------------------------------------------------------------
/html/images/images-subpage/btn_gotoappstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-subpage/btn_gotoappstore.png
--------------------------------------------------------------------------------
/html/images/images-subpage/btn_gotoappstore_soon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-subpage/btn_gotoappstore_soon.png
--------------------------------------------------------------------------------
/html/images/images-subpage/chrome.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-subpage/chrome.png
--------------------------------------------------------------------------------
/html/images/images-subpage/h1_howtoinstall.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-subpage/h1_howtoinstall.png
--------------------------------------------------------------------------------
/html/images/images-subpage/h1_howtouse.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-subpage/h1_howtouse.png
--------------------------------------------------------------------------------
/html/images/images-subpage/h1_libronforiphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-subpage/h1_libronforiphone.png
--------------------------------------------------------------------------------
/html/images/images-subpage/h2_forchromeuser.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-subpage/h2_forchromeuser.png
--------------------------------------------------------------------------------
/html/images/images-subpage/h2_forfirefoxuser.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-subpage/h2_forfirefoxuser.png
--------------------------------------------------------------------------------
/html/images/images-subpage/h2_foriphoneuser.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-subpage/h2_foriphoneuser.png
--------------------------------------------------------------------------------
/html/images/images-subpage/h2_forsafariuser.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-subpage/h2_forsafariuser.png
--------------------------------------------------------------------------------
/html/images/images-subpage/h2bg_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-subpage/h2bg_1.png
--------------------------------------------------------------------------------
/html/images/images-subpage/h2bg_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-subpage/h2bg_2.png
--------------------------------------------------------------------------------
/html/images/images-subpage/h2bg_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-subpage/h2bg_3.png
--------------------------------------------------------------------------------
/html/images/images-subpage/h2bg_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-subpage/h2bg_4.png
--------------------------------------------------------------------------------
/html/images/images-subpage/h2bg_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-subpage/h2bg_5.png
--------------------------------------------------------------------------------
/html/images/images-subpage/h2bg_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-subpage/h2bg_6.png
--------------------------------------------------------------------------------
/html/images/images-subpage/h2bg_7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-subpage/h2bg_7.png
--------------------------------------------------------------------------------
/html/images/images-subpage/h2bg_8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-subpage/h2bg_8.png
--------------------------------------------------------------------------------
/html/images/images-subpage/h2bg_9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-subpage/h2bg_9.png
--------------------------------------------------------------------------------
/html/images/images-subpage/iphone01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-subpage/iphone01.png
--------------------------------------------------------------------------------
/html/images/images-subpage/iphone02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-subpage/iphone02.png
--------------------------------------------------------------------------------
/html/images/images-subpage/iphone03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-subpage/iphone03.png
--------------------------------------------------------------------------------
/html/images/images-subpage/iphone04.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-subpage/iphone04.png
--------------------------------------------------------------------------------
/html/images/images-subpage/iphone05.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-subpage/iphone05.png
--------------------------------------------------------------------------------
/html/images/images-subpage/libron1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-subpage/libron1.png
--------------------------------------------------------------------------------
/html/images/images-subpage/libron2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-subpage/libron2.png
--------------------------------------------------------------------------------
/html/images/images-subpage/libron3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-subpage/libron3.png
--------------------------------------------------------------------------------
/html/images/images-subpage/libron4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/images-subpage/libron4.png
--------------------------------------------------------------------------------
/html/images/img_1984.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/img_1984.png
--------------------------------------------------------------------------------
/html/images/img_bookmark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/img_bookmark.png
--------------------------------------------------------------------------------
/html/images/img_editbookmark1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/img_editbookmark1.png
--------------------------------------------------------------------------------
/html/images/img_editbookmark2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/img_editbookmark2.png
--------------------------------------------------------------------------------
/html/images/install/chrome_extension.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/install/chrome_extension.png
--------------------------------------------------------------------------------
/html/images/install/extension_bar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/install/extension_bar.png
--------------------------------------------------------------------------------
/html/images/install/install.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/install/install.gif
--------------------------------------------------------------------------------
/html/images/libron_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/libron_icon.png
--------------------------------------------------------------------------------
/html/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/logo.png
--------------------------------------------------------------------------------
/html/images/nav_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/nav_bg.png
--------------------------------------------------------------------------------
/html/images/nav_home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/nav_home.png
--------------------------------------------------------------------------------
/html/images/nav_home_over.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/nav_home_over.png
--------------------------------------------------------------------------------
/html/images/nav_howtoinstall.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/nav_howtoinstall.png
--------------------------------------------------------------------------------
/html/images/nav_howtoinstall_over.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/nav_howtoinstall_over.png
--------------------------------------------------------------------------------
/html/images/nav_howtouse.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/nav_howtouse.png
--------------------------------------------------------------------------------
/html/images/nav_howtouse_over.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/nav_howtouse_over.png
--------------------------------------------------------------------------------
/html/images/old/1x1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/old/1x1.png
--------------------------------------------------------------------------------
/html/images/old/accept.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/old/accept.png
--------------------------------------------------------------------------------
/html/images/old/cancel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/old/cancel.png
--------------------------------------------------------------------------------
/html/images/old/cog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/old/cog.png
--------------------------------------------------------------------------------
/html/images/old/film.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/old/film.png
--------------------------------------------------------------------------------
/html/images/old/firefox-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/old/firefox-logo.png
--------------------------------------------------------------------------------
/html/images/old/gm_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/old/gm_icon.png
--------------------------------------------------------------------------------
/html/images/old/libron1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/old/libron1.png
--------------------------------------------------------------------------------
/html/images/old/libron2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/old/libron2.png
--------------------------------------------------------------------------------
/html/images/old/libron3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/old/libron3.png
--------------------------------------------------------------------------------
/html/images/old/safari-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/old/safari-logo.png
--------------------------------------------------------------------------------
/html/images/old/sendpoint.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/old/sendpoint.gif
--------------------------------------------------------------------------------
/html/images/old/titlebg230.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/old/titlebg230.gif
--------------------------------------------------------------------------------
/html/images/safari_extension.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/safari_extension.png
--------------------------------------------------------------------------------
/html/images/tampermonkey.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/tampermonkey.png
--------------------------------------------------------------------------------
/html/images/tampermonkey2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/tampermonkey2.png
--------------------------------------------------------------------------------
/html/images/tampermonkey3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/tampermonkey3.png
--------------------------------------------------------------------------------
/html/images/twitter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/twitter.png
--------------------------------------------------------------------------------
/html/images/usage/amazon_page.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/usage/amazon_page.png
--------------------------------------------------------------------------------
/html/images/usage/amazon_search_bar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/usage/amazon_search_bar.png
--------------------------------------------------------------------------------
/html/images/usage/howtouse.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/usage/howtouse.gif
--------------------------------------------------------------------------------
/html/images/usage/libron_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/usage/libron_icon.png
--------------------------------------------------------------------------------
/html/images/usage/popup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/usage/popup.png
--------------------------------------------------------------------------------
/html/images/usage/popup2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/html/images/usage/popup2.png
--------------------------------------------------------------------------------
/html/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | Libron(リブロン) – 図書館をもっと身近に
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | Fork me on GitHub
24 |
25 |
26 |
29 |
36 |
37 |
38 |
41 |
42 |
43 |
44 |
Libron(リブロン)とは
45 |
Libron は Amazon のページから素早く最寄りの図書館の蔵書を検索し、貸出予約ができる便利なツールです。
46 |
図書館蔵書検索サイト「カーリル」(https://calil.jp/)の提供するAPIを利用することで、全国7000以上の図書館(1400館以上の大学図書館を含む)に対応しています。
47 |
48 |
49 |
55 |
61 |
62 |
63 |
66 |
84 |
85 |
86 |
89 |
90 |
91 |
92 |
サポートのお願い
93 | 2010年よりLibronはオープンソースかつ無料で提供しております。継続して開発を続けるためには、使っていただいている皆さまからの支援が必要です。
1杯のコーヒーという形でサポートをいただけると大変ありがたく思います。
94 |
95 | ※ クレジットカードの明細には「
合同会社つくる社」と表示されます。
96 |
97 |
98 |
99 |
100 |
101 |
更新履歴
102 |
103 |
107 | - 3.0.18 - 2023/01/23
108 | - 本以外の商品ページでも検索のローディングアイコンが表示されてしまうバグを修正しました。
109 | - 3.0.17 - 2023/01/12
110 | - Kindle や Audible のページでも対応する単行本が図書館にあるかどうかを表示するようにしました。
111 | - 3.0.16 - 2023/01/06
112 | - 図書館設定画面を新しくしました。拡張機能バーより Libron のアイコンをクリックして開いて下さい。
113 | - 3.0.15 - 2023/01/02
114 | - Chrome Extension Manifest V3に対応しました。
115 | - 3.0.13 - 2020/12/06
116 | - Chrome 87以降で動作しない問題を修正しました。
117 | - 3.0.12 - 2019/03/28
118 | - LibronをインストールしているとAmazon Payでエラーが発生する問題を修正しました。
119 | - 2018/10/11
120 | - Safari 12より.safariextzスタイルの拡張機能がサポートされなくなりました。これに伴い、LibronでSafariをサポートすることが難しくなったため、サポートをやめることにいたしました。
121 | - 3.0.10 - 2018/01/10
122 | - 図書館選択ができなくなっていた問題を修正しました。
123 | - 3.0.9 - 2016/06/12
124 | - Amazonのhttpsページに対応しました。
125 | - 3.0.8
126 | - ほしい物リスト(Wishlist)に対応し直しました。
127 | - 3.0.7
128 | - Amazonの書籍ページのデザイン変更に対応しました。
129 | - 3.0.5(Greasemonkey版のみ)
130 | - Firefox Greasemonkey版をリリースしました。
131 | - 3.0.4
132 | - 「大学図書館も表示」のチェックあり/なし が保存されていなかった問題を修正しました。
133 | - 3.0.3
134 | - Chrome Extension版で図書館の選択と蔵書検索ができなくなってしまった問題を修正しました。
135 | - Chrome Extension版をManifest version 2に対応
136 | - 3.0.2
137 | - 本が図書館にない場合、他の図書館で借りられるかどうかすぐに調べられるようにカーリルのリンクを表示するようにしました。
138 | - 3.0.1
139 | - デフォルトのリスト以外の「ほしい物リスト」(新しく自分で作成した「ほしい物リスト」)にも対応しました。
140 |
141 |
142 |
143 |
144 |
145 |
148 |
149 |
150 |
151 | 
152 | 
153 |
154 |
155 |
156 |
157 |
158 |
159 |
162 |
172 |
173 |
174 |
178 |
183 |
184 |
185 |
--------------------------------------------------------------------------------
/html/javascripts/application.js:
--------------------------------------------------------------------------------
1 | // Place your application-specific JavaScript functions and classes here
2 | // This file is automatically included by javascript_include_tag :defaults
3 |
--------------------------------------------------------------------------------
/html/javascripts/dragdrop.js:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
2 | // (c) 2005-2008 Sammi Williams (http://www.oriontransfer.co.nz, sammi@oriontransfer.co.nz)
3 | //
4 | // script.aculo.us is freely distributable under the terms of an MIT-style license.
5 | // For details, see the script.aculo.us web site: http://script.aculo.us/
6 |
7 | if(Object.isUndefined(Effect))
8 | throw("dragdrop.js requires including script.aculo.us' effects.js library");
9 |
10 | var Droppables = {
11 | drops: [],
12 |
13 | remove: function(element) {
14 | this.drops = this.drops.reject(function(d) { return d.element==$(element) });
15 | },
16 |
17 | add: function(element) {
18 | element = $(element);
19 | var options = Object.extend({
20 | greedy: true,
21 | hoverclass: null,
22 | tree: false
23 | }, arguments[1] || { });
24 |
25 | // cache containers
26 | if(options.containment) {
27 | options._containers = [];
28 | var containment = options.containment;
29 | if(Object.isArray(containment)) {
30 | containment.each( function(c) { options._containers.push($(c)) });
31 | } else {
32 | options._containers.push($(containment));
33 | }
34 | }
35 |
36 | if(options.accept) options.accept = [options.accept].flatten();
37 |
38 | Element.makePositioned(element); // fix IE
39 | options.element = element;
40 |
41 | this.drops.push(options);
42 | },
43 |
44 | findDeepestChild: function(drops) {
45 | deepest = drops[0];
46 |
47 | for (i = 1; i < drops.length; ++i)
48 | if (Element.isParent(drops[i].element, deepest.element))
49 | deepest = drops[i];
50 |
51 | return deepest;
52 | },
53 |
54 | isContained: function(element, drop) {
55 | var containmentNode;
56 | if(drop.tree) {
57 | containmentNode = element.treeNode;
58 | } else {
59 | containmentNode = element.parentNode;
60 | }
61 | return drop._containers.detect(function(c) { return containmentNode == c });
62 | },
63 |
64 | isAffected: function(point, element, drop) {
65 | return (
66 | (drop.element!=element) &&
67 | ((!drop._containers) ||
68 | this.isContained(element, drop)) &&
69 | ((!drop.accept) ||
70 | (Element.classNames(element).detect(
71 | function(v) { return drop.accept.include(v) } ) )) &&
72 | Position.within(drop.element, point[0], point[1]) );
73 | },
74 |
75 | deactivate: function(drop) {
76 | if(drop.hoverclass)
77 | Element.removeClassName(drop.element, drop.hoverclass);
78 | this.last_active = null;
79 | },
80 |
81 | activate: function(drop) {
82 | if(drop.hoverclass)
83 | Element.addClassName(drop.element, drop.hoverclass);
84 | this.last_active = drop;
85 | },
86 |
87 | show: function(point, element) {
88 | if(!this.drops.length) return;
89 | var drop, affected = [];
90 |
91 | this.drops.each( function(drop) {
92 | if(Droppables.isAffected(point, element, drop))
93 | affected.push(drop);
94 | });
95 |
96 | if(affected.length>0)
97 | drop = Droppables.findDeepestChild(affected);
98 |
99 | if(this.last_active && this.last_active != drop) this.deactivate(this.last_active);
100 | if (drop) {
101 | Position.within(drop.element, point[0], point[1]);
102 | if(drop.onHover)
103 | drop.onHover(element, drop.element, Position.overlap(drop.overlap, drop.element));
104 |
105 | if (drop != this.last_active) Droppables.activate(drop);
106 | }
107 | },
108 |
109 | fire: function(event, element) {
110 | if(!this.last_active) return;
111 | Position.prepare();
112 |
113 | if (this.isAffected([Event.pointerX(event), Event.pointerY(event)], element, this.last_active))
114 | if (this.last_active.onDrop) {
115 | this.last_active.onDrop(element, this.last_active.element, event);
116 | return true;
117 | }
118 | },
119 |
120 | reset: function() {
121 | if(this.last_active)
122 | this.deactivate(this.last_active);
123 | }
124 | };
125 |
126 | var Draggables = {
127 | drags: [],
128 | observers: [],
129 |
130 | register: function(draggable) {
131 | if(this.drags.length == 0) {
132 | this.eventMouseUp = this.endDrag.bindAsEventListener(this);
133 | this.eventMouseMove = this.updateDrag.bindAsEventListener(this);
134 | this.eventKeypress = this.keyPress.bindAsEventListener(this);
135 |
136 | Event.observe(document, "mouseup", this.eventMouseUp);
137 | Event.observe(document, "mousemove", this.eventMouseMove);
138 | Event.observe(document, "keypress", this.eventKeypress);
139 | }
140 | this.drags.push(draggable);
141 | },
142 |
143 | unregister: function(draggable) {
144 | this.drags = this.drags.reject(function(d) { return d==draggable });
145 | if(this.drags.length == 0) {
146 | Event.stopObserving(document, "mouseup", this.eventMouseUp);
147 | Event.stopObserving(document, "mousemove", this.eventMouseMove);
148 | Event.stopObserving(document, "keypress", this.eventKeypress);
149 | }
150 | },
151 |
152 | activate: function(draggable) {
153 | if(draggable.options.delay) {
154 | this._timeout = setTimeout(function() {
155 | Draggables._timeout = null;
156 | window.focus();
157 | Draggables.activeDraggable = draggable;
158 | }.bind(this), draggable.options.delay);
159 | } else {
160 | window.focus(); // allows keypress events if window isn't currently focused, fails for Safari
161 | this.activeDraggable = draggable;
162 | }
163 | },
164 |
165 | deactivate: function() {
166 | this.activeDraggable = null;
167 | },
168 |
169 | updateDrag: function(event) {
170 | if(!this.activeDraggable) return;
171 | var pointer = [Event.pointerX(event), Event.pointerY(event)];
172 | // Mozilla-based browsers fire successive mousemove events with
173 | // the same coordinates, prevent needless redrawing (moz bug?)
174 | if(this._lastPointer && (this._lastPointer.inspect() == pointer.inspect())) return;
175 | this._lastPointer = pointer;
176 |
177 | this.activeDraggable.updateDrag(event, pointer);
178 | },
179 |
180 | endDrag: function(event) {
181 | if(this._timeout) {
182 | clearTimeout(this._timeout);
183 | this._timeout = null;
184 | }
185 | if(!this.activeDraggable) return;
186 | this._lastPointer = null;
187 | this.activeDraggable.endDrag(event);
188 | this.activeDraggable = null;
189 | },
190 |
191 | keyPress: function(event) {
192 | if(this.activeDraggable)
193 | this.activeDraggable.keyPress(event);
194 | },
195 |
196 | addObserver: function(observer) {
197 | this.observers.push(observer);
198 | this._cacheObserverCallbacks();
199 | },
200 |
201 | removeObserver: function(element) { // element instead of observer fixes mem leaks
202 | this.observers = this.observers.reject( function(o) { return o.element==element });
203 | this._cacheObserverCallbacks();
204 | },
205 |
206 | notify: function(eventName, draggable, event) { // 'onStart', 'onEnd', 'onDrag'
207 | if(this[eventName+'Count'] > 0)
208 | this.observers.each( function(o) {
209 | if(o[eventName]) o[eventName](eventName, draggable, event);
210 | });
211 | if(draggable.options[eventName]) draggable.options[eventName](draggable, event);
212 | },
213 |
214 | _cacheObserverCallbacks: function() {
215 | ['onStart','onEnd','onDrag'].each( function(eventName) {
216 | Draggables[eventName+'Count'] = Draggables.observers.select(
217 | function(o) { return o[eventName]; }
218 | ).length;
219 | });
220 | }
221 | };
222 |
223 | /*--------------------------------------------------------------------------*/
224 |
225 | var Draggable = Class.create({
226 | initialize: function(element) {
227 | var defaults = {
228 | handle: false,
229 | reverteffect: function(element, top_offset, left_offset) {
230 | var dur = Math.sqrt(Math.abs(top_offset^2)+Math.abs(left_offset^2))*0.02;
231 | new Effect.Move(element, { x: -left_offset, y: -top_offset, duration: dur,
232 | queue: {scope:'_draggable', position:'end'}
233 | });
234 | },
235 | endeffect: function(element) {
236 | var toOpacity = Object.isNumber(element._opacity) ? element._opacity : 1.0;
237 | new Effect.Opacity(element, {duration:0.2, from:0.7, to:toOpacity,
238 | queue: {scope:'_draggable', position:'end'},
239 | afterFinish: function(){
240 | Draggable._dragging[element] = false
241 | }
242 | });
243 | },
244 | zindex: 1000,
245 | revert: false,
246 | quiet: false,
247 | scroll: false,
248 | scrollSensitivity: 20,
249 | scrollSpeed: 15,
250 | snap: false, // false, or xy or [x,y] or function(x,y){ return [x,y] }
251 | delay: 0
252 | };
253 |
254 | if(!arguments[1] || Object.isUndefined(arguments[1].endeffect))
255 | Object.extend(defaults, {
256 | starteffect: function(element) {
257 | element._opacity = Element.getOpacity(element);
258 | Draggable._dragging[element] = true;
259 | new Effect.Opacity(element, {duration:0.2, from:element._opacity, to:0.7});
260 | }
261 | });
262 |
263 | var options = Object.extend(defaults, arguments[1] || { });
264 |
265 | this.element = $(element);
266 |
267 | if(options.handle && Object.isString(options.handle))
268 | this.handle = this.element.down('.'+options.handle, 0);
269 |
270 | if(!this.handle) this.handle = $(options.handle);
271 | if(!this.handle) this.handle = this.element;
272 |
273 | if(options.scroll && !options.scroll.scrollTo && !options.scroll.outerHTML) {
274 | options.scroll = $(options.scroll);
275 | this._isScrollChild = Element.childOf(this.element, options.scroll);
276 | }
277 |
278 | Element.makePositioned(this.element); // fix IE
279 |
280 | this.options = options;
281 | this.dragging = false;
282 |
283 | this.eventMouseDown = this.initDrag.bindAsEventListener(this);
284 | Event.observe(this.handle, "mousedown", this.eventMouseDown);
285 |
286 | Draggables.register(this);
287 | },
288 |
289 | destroy: function() {
290 | Event.stopObserving(this.handle, "mousedown", this.eventMouseDown);
291 | Draggables.unregister(this);
292 | },
293 |
294 | currentDelta: function() {
295 | return([
296 | parseInt(Element.getStyle(this.element,'left') || '0'),
297 | parseInt(Element.getStyle(this.element,'top') || '0')]);
298 | },
299 |
300 | initDrag: function(event) {
301 | if(!Object.isUndefined(Draggable._dragging[this.element]) &&
302 | Draggable._dragging[this.element]) return;
303 | if(Event.isLeftClick(event)) {
304 | // abort on form elements, fixes a Firefox issue
305 | var src = Event.element(event);
306 | if((tag_name = src.tagName.toUpperCase()) && (
307 | tag_name=='INPUT' ||
308 | tag_name=='SELECT' ||
309 | tag_name=='OPTION' ||
310 | tag_name=='BUTTON' ||
311 | tag_name=='TEXTAREA')) return;
312 |
313 | var pointer = [Event.pointerX(event), Event.pointerY(event)];
314 | var pos = Position.cumulativeOffset(this.element);
315 | this.offset = [0,1].map( function(i) { return (pointer[i] - pos[i]) });
316 |
317 | Draggables.activate(this);
318 | Event.stop(event);
319 | }
320 | },
321 |
322 | startDrag: function(event) {
323 | this.dragging = true;
324 | if(!this.delta)
325 | this.delta = this.currentDelta();
326 |
327 | if(this.options.zindex) {
328 | this.originalZ = parseInt(Element.getStyle(this.element,'z-index') || 0);
329 | this.element.style.zIndex = this.options.zindex;
330 | }
331 |
332 | if(this.options.ghosting) {
333 | this._clone = this.element.cloneNode(true);
334 | this._originallyAbsolute = (this.element.getStyle('position') == 'absolute');
335 | if (!this._originallyAbsolute)
336 | Position.absolutize(this.element);
337 | this.element.parentNode.insertBefore(this._clone, this.element);
338 | }
339 |
340 | if(this.options.scroll) {
341 | if (this.options.scroll == window) {
342 | var where = this._getWindowScroll(this.options.scroll);
343 | this.originalScrollLeft = where.left;
344 | this.originalScrollTop = where.top;
345 | } else {
346 | this.originalScrollLeft = this.options.scroll.scrollLeft;
347 | this.originalScrollTop = this.options.scroll.scrollTop;
348 | }
349 | }
350 |
351 | Draggables.notify('onStart', this, event);
352 |
353 | if(this.options.starteffect) this.options.starteffect(this.element);
354 | },
355 |
356 | updateDrag: function(event, pointer) {
357 | if(!this.dragging) this.startDrag(event);
358 |
359 | if(!this.options.quiet){
360 | Position.prepare();
361 | Droppables.show(pointer, this.element);
362 | }
363 |
364 | Draggables.notify('onDrag', this, event);
365 |
366 | this.draw(pointer);
367 | if(this.options.change) this.options.change(this);
368 |
369 | if(this.options.scroll) {
370 | this.stopScrolling();
371 |
372 | var p;
373 | if (this.options.scroll == window) {
374 | with(this._getWindowScroll(this.options.scroll)) { p = [ left, top, left+width, top+height ]; }
375 | } else {
376 | p = Position.page(this.options.scroll);
377 | p[0] += this.options.scroll.scrollLeft + Position.deltaX;
378 | p[1] += this.options.scroll.scrollTop + Position.deltaY;
379 | p.push(p[0]+this.options.scroll.offsetWidth);
380 | p.push(p[1]+this.options.scroll.offsetHeight);
381 | }
382 | var speed = [0,0];
383 | if(pointer[0] < (p[0]+this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[0]+this.options.scrollSensitivity);
384 | if(pointer[1] < (p[1]+this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[1]+this.options.scrollSensitivity);
385 | if(pointer[0] > (p[2]-this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[2]-this.options.scrollSensitivity);
386 | if(pointer[1] > (p[3]-this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[3]-this.options.scrollSensitivity);
387 | this.startScrolling(speed);
388 | }
389 |
390 | // fix AppleWebKit rendering
391 | if(Prototype.Browser.WebKit) window.scrollBy(0,0);
392 |
393 | Event.stop(event);
394 | },
395 |
396 | finishDrag: function(event, success) {
397 | this.dragging = false;
398 |
399 | if(this.options.quiet){
400 | Position.prepare();
401 | var pointer = [Event.pointerX(event), Event.pointerY(event)];
402 | Droppables.show(pointer, this.element);
403 | }
404 |
405 | if(this.options.ghosting) {
406 | if (!this._originallyAbsolute)
407 | Position.relativize(this.element);
408 | delete this._originallyAbsolute;
409 | Element.remove(this._clone);
410 | this._clone = null;
411 | }
412 |
413 | var dropped = false;
414 | if(success) {
415 | dropped = Droppables.fire(event, this.element);
416 | if (!dropped) dropped = false;
417 | }
418 | if(dropped && this.options.onDropped) this.options.onDropped(this.element);
419 | Draggables.notify('onEnd', this, event);
420 |
421 | var revert = this.options.revert;
422 | if(revert && Object.isFunction(revert)) revert = revert(this.element);
423 |
424 | var d = this.currentDelta();
425 | if(revert && this.options.reverteffect) {
426 | if (dropped == 0 || revert != 'failure')
427 | this.options.reverteffect(this.element,
428 | d[1]-this.delta[1], d[0]-this.delta[0]);
429 | } else {
430 | this.delta = d;
431 | }
432 |
433 | if(this.options.zindex)
434 | this.element.style.zIndex = this.originalZ;
435 |
436 | if(this.options.endeffect)
437 | this.options.endeffect(this.element);
438 |
439 | Draggables.deactivate(this);
440 | Droppables.reset();
441 | },
442 |
443 | keyPress: function(event) {
444 | if(event.keyCode!=Event.KEY_ESC) return;
445 | this.finishDrag(event, false);
446 | Event.stop(event);
447 | },
448 |
449 | endDrag: function(event) {
450 | if(!this.dragging) return;
451 | this.stopScrolling();
452 | this.finishDrag(event, true);
453 | Event.stop(event);
454 | },
455 |
456 | draw: function(point) {
457 | var pos = Position.cumulativeOffset(this.element);
458 | if(this.options.ghosting) {
459 | var r = Position.realOffset(this.element);
460 | pos[0] += r[0] - Position.deltaX; pos[1] += r[1] - Position.deltaY;
461 | }
462 |
463 | var d = this.currentDelta();
464 | pos[0] -= d[0]; pos[1] -= d[1];
465 |
466 | if(this.options.scroll && (this.options.scroll != window && this._isScrollChild)) {
467 | pos[0] -= this.options.scroll.scrollLeft-this.originalScrollLeft;
468 | pos[1] -= this.options.scroll.scrollTop-this.originalScrollTop;
469 | }
470 |
471 | var p = [0,1].map(function(i){
472 | return (point[i]-pos[i]-this.offset[i])
473 | }.bind(this));
474 |
475 | if(this.options.snap) {
476 | if(Object.isFunction(this.options.snap)) {
477 | p = this.options.snap(p[0],p[1],this);
478 | } else {
479 | if(Object.isArray(this.options.snap)) {
480 | p = p.map( function(v, i) {
481 | return (v/this.options.snap[i]).round()*this.options.snap[i] }.bind(this));
482 | } else {
483 | p = p.map( function(v) {
484 | return (v/this.options.snap).round()*this.options.snap }.bind(this));
485 | }
486 | }}
487 |
488 | var style = this.element.style;
489 | if((!this.options.constraint) || (this.options.constraint=='horizontal'))
490 | style.left = p[0] + "px";
491 | if((!this.options.constraint) || (this.options.constraint=='vertical'))
492 | style.top = p[1] + "px";
493 |
494 | if(style.visibility=="hidden") style.visibility = ""; // fix gecko rendering
495 | },
496 |
497 | stopScrolling: function() {
498 | if(this.scrollInterval) {
499 | clearInterval(this.scrollInterval);
500 | this.scrollInterval = null;
501 | Draggables._lastScrollPointer = null;
502 | }
503 | },
504 |
505 | startScrolling: function(speed) {
506 | if(!(speed[0] || speed[1])) return;
507 | this.scrollSpeed = [speed[0]*this.options.scrollSpeed,speed[1]*this.options.scrollSpeed];
508 | this.lastScrolled = new Date();
509 | this.scrollInterval = setInterval(this.scroll.bind(this), 10);
510 | },
511 |
512 | scroll: function() {
513 | var current = new Date();
514 | var delta = current - this.lastScrolled;
515 | this.lastScrolled = current;
516 | if(this.options.scroll == window) {
517 | with (this._getWindowScroll(this.options.scroll)) {
518 | if (this.scrollSpeed[0] || this.scrollSpeed[1]) {
519 | var d = delta / 1000;
520 | this.options.scroll.scrollTo( left + d*this.scrollSpeed[0], top + d*this.scrollSpeed[1] );
521 | }
522 | }
523 | } else {
524 | this.options.scroll.scrollLeft += this.scrollSpeed[0] * delta / 1000;
525 | this.options.scroll.scrollTop += this.scrollSpeed[1] * delta / 1000;
526 | }
527 |
528 | Position.prepare();
529 | Droppables.show(Draggables._lastPointer, this.element);
530 | Draggables.notify('onDrag', this);
531 | if (this._isScrollChild) {
532 | Draggables._lastScrollPointer = Draggables._lastScrollPointer || $A(Draggables._lastPointer);
533 | Draggables._lastScrollPointer[0] += this.scrollSpeed[0] * delta / 1000;
534 | Draggables._lastScrollPointer[1] += this.scrollSpeed[1] * delta / 1000;
535 | if (Draggables._lastScrollPointer[0] < 0)
536 | Draggables._lastScrollPointer[0] = 0;
537 | if (Draggables._lastScrollPointer[1] < 0)
538 | Draggables._lastScrollPointer[1] = 0;
539 | this.draw(Draggables._lastScrollPointer);
540 | }
541 |
542 | if(this.options.change) this.options.change(this);
543 | },
544 |
545 | _getWindowScroll: function(w) {
546 | var T, L, W, H;
547 | with (w.document) {
548 | if (w.document.documentElement && documentElement.scrollTop) {
549 | T = documentElement.scrollTop;
550 | L = documentElement.scrollLeft;
551 | } else if (w.document.body) {
552 | T = body.scrollTop;
553 | L = body.scrollLeft;
554 | }
555 | if (w.innerWidth) {
556 | W = w.innerWidth;
557 | H = w.innerHeight;
558 | } else if (w.document.documentElement && documentElement.clientWidth) {
559 | W = documentElement.clientWidth;
560 | H = documentElement.clientHeight;
561 | } else {
562 | W = body.offsetWidth;
563 | H = body.offsetHeight;
564 | }
565 | }
566 | return { top: T, left: L, width: W, height: H };
567 | }
568 | });
569 |
570 | Draggable._dragging = { };
571 |
572 | /*--------------------------------------------------------------------------*/
573 |
574 | var SortableObserver = Class.create({
575 | initialize: function(element, observer) {
576 | this.element = $(element);
577 | this.observer = observer;
578 | this.lastValue = Sortable.serialize(this.element);
579 | },
580 |
581 | onStart: function() {
582 | this.lastValue = Sortable.serialize(this.element);
583 | },
584 |
585 | onEnd: function() {
586 | Sortable.unmark();
587 | if(this.lastValue != Sortable.serialize(this.element))
588 | this.observer(this.element)
589 | }
590 | });
591 |
592 | var Sortable = {
593 | SERIALIZE_RULE: /^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/,
594 |
595 | sortables: { },
596 |
597 | _findRootElement: function(element) {
598 | while (element.tagName.toUpperCase() != "BODY") {
599 | if(element.id && Sortable.sortables[element.id]) return element;
600 | element = element.parentNode;
601 | }
602 | },
603 |
604 | options: function(element) {
605 | element = Sortable._findRootElement($(element));
606 | if(!element) return;
607 | return Sortable.sortables[element.id];
608 | },
609 |
610 | destroy: function(element){
611 | element = $(element);
612 | var s = Sortable.sortables[element.id];
613 |
614 | if(s) {
615 | Draggables.removeObserver(s.element);
616 | s.droppables.each(function(d){ Droppables.remove(d) });
617 | s.draggables.invoke('destroy');
618 |
619 | delete Sortable.sortables[s.element.id];
620 | }
621 | },
622 |
623 | create: function(element) {
624 | element = $(element);
625 | var options = Object.extend({
626 | element: element,
627 | tag: 'li', // assumes li children, override with tag: 'tagname'
628 | dropOnEmpty: false,
629 | tree: false,
630 | treeTag: 'ul',
631 | overlap: 'vertical', // one of 'vertical', 'horizontal'
632 | constraint: 'vertical', // one of 'vertical', 'horizontal', false
633 | containment: element, // also takes array of elements (or id's); or false
634 | handle: false, // or a CSS class
635 | only: false,
636 | delay: 0,
637 | hoverclass: null,
638 | ghosting: false,
639 | quiet: false,
640 | scroll: false,
641 | scrollSensitivity: 20,
642 | scrollSpeed: 15,
643 | format: this.SERIALIZE_RULE,
644 |
645 | // these take arrays of elements or ids and can be
646 | // used for better initialization performance
647 | elements: false,
648 | handles: false,
649 |
650 | onChange: Prototype.emptyFunction,
651 | onUpdate: Prototype.emptyFunction
652 | }, arguments[1] || { });
653 |
654 | // clear any old sortable with same element
655 | this.destroy(element);
656 |
657 | // build options for the draggables
658 | var options_for_draggable = {
659 | revert: true,
660 | quiet: options.quiet,
661 | scroll: options.scroll,
662 | scrollSpeed: options.scrollSpeed,
663 | scrollSensitivity: options.scrollSensitivity,
664 | delay: options.delay,
665 | ghosting: options.ghosting,
666 | constraint: options.constraint,
667 | handle: options.handle };
668 |
669 | if(options.starteffect)
670 | options_for_draggable.starteffect = options.starteffect;
671 |
672 | if(options.reverteffect)
673 | options_for_draggable.reverteffect = options.reverteffect;
674 | else
675 | if(options.ghosting) options_for_draggable.reverteffect = function(element) {
676 | element.style.top = 0;
677 | element.style.left = 0;
678 | };
679 |
680 | if(options.endeffect)
681 | options_for_draggable.endeffect = options.endeffect;
682 |
683 | if(options.zindex)
684 | options_for_draggable.zindex = options.zindex;
685 |
686 | // build options for the droppables
687 | var options_for_droppable = {
688 | overlap: options.overlap,
689 | containment: options.containment,
690 | tree: options.tree,
691 | hoverclass: options.hoverclass,
692 | onHover: Sortable.onHover
693 | };
694 |
695 | var options_for_tree = {
696 | onHover: Sortable.onEmptyHover,
697 | overlap: options.overlap,
698 | containment: options.containment,
699 | hoverclass: options.hoverclass
700 | };
701 |
702 | // fix for gecko engine
703 | Element.cleanWhitespace(element);
704 |
705 | options.draggables = [];
706 | options.droppables = [];
707 |
708 | // drop on empty handling
709 | if(options.dropOnEmpty || options.tree) {
710 | Droppables.add(element, options_for_tree);
711 | options.droppables.push(element);
712 | }
713 |
714 | (options.elements || this.findElements(element, options) || []).each( function(e,i) {
715 | var handle = options.handles ? $(options.handles[i]) :
716 | (options.handle ? $(e).select('.' + options.handle)[0] : e);
717 | options.draggables.push(
718 | new Draggable(e, Object.extend(options_for_draggable, { handle: handle })));
719 | Droppables.add(e, options_for_droppable);
720 | if(options.tree) e.treeNode = element;
721 | options.droppables.push(e);
722 | });
723 |
724 | if(options.tree) {
725 | (Sortable.findTreeElements(element, options) || []).each( function(e) {
726 | Droppables.add(e, options_for_tree);
727 | e.treeNode = element;
728 | options.droppables.push(e);
729 | });
730 | }
731 |
732 | // keep reference
733 | this.sortables[element.id] = options;
734 |
735 | // for onupdate
736 | Draggables.addObserver(new SortableObserver(element, options.onUpdate));
737 |
738 | },
739 |
740 | // return all suitable-for-sortable elements in a guaranteed order
741 | findElements: function(element, options) {
742 | return Element.findChildren(
743 | element, options.only, options.tree ? true : false, options.tag);
744 | },
745 |
746 | findTreeElements: function(element, options) {
747 | return Element.findChildren(
748 | element, options.only, options.tree ? true : false, options.treeTag);
749 | },
750 |
751 | onHover: function(element, dropon, overlap) {
752 | if(Element.isParent(dropon, element)) return;
753 |
754 | if(overlap > .33 && overlap < .66 && Sortable.options(dropon).tree) {
755 | return;
756 | } else if(overlap>0.5) {
757 | Sortable.mark(dropon, 'before');
758 | if(dropon.previousSibling != element) {
759 | var oldParentNode = element.parentNode;
760 | element.style.visibility = "hidden"; // fix gecko rendering
761 | dropon.parentNode.insertBefore(element, dropon);
762 | if(dropon.parentNode!=oldParentNode)
763 | Sortable.options(oldParentNode).onChange(element);
764 | Sortable.options(dropon.parentNode).onChange(element);
765 | }
766 | } else {
767 | Sortable.mark(dropon, 'after');
768 | var nextElement = dropon.nextSibling || null;
769 | if(nextElement != element) {
770 | var oldParentNode = element.parentNode;
771 | element.style.visibility = "hidden"; // fix gecko rendering
772 | dropon.parentNode.insertBefore(element, nextElement);
773 | if(dropon.parentNode!=oldParentNode)
774 | Sortable.options(oldParentNode).onChange(element);
775 | Sortable.options(dropon.parentNode).onChange(element);
776 | }
777 | }
778 | },
779 |
780 | onEmptyHover: function(element, dropon, overlap) {
781 | var oldParentNode = element.parentNode;
782 | var droponOptions = Sortable.options(dropon);
783 |
784 | if(!Element.isParent(dropon, element)) {
785 | var index;
786 |
787 | var children = Sortable.findElements(dropon, {tag: droponOptions.tag, only: droponOptions.only});
788 | var child = null;
789 |
790 | if(children) {
791 | var offset = Element.offsetSize(dropon, droponOptions.overlap) * (1.0 - overlap);
792 |
793 | for (index = 0; index < children.length; index += 1) {
794 | if (offset - Element.offsetSize (children[index], droponOptions.overlap) >= 0) {
795 | offset -= Element.offsetSize (children[index], droponOptions.overlap);
796 | } else if (offset - (Element.offsetSize (children[index], droponOptions.overlap) / 2) >= 0) {
797 | child = index + 1 < children.length ? children[index + 1] : null;
798 | break;
799 | } else {
800 | child = children[index];
801 | break;
802 | }
803 | }
804 | }
805 |
806 | dropon.insertBefore(element, child);
807 |
808 | Sortable.options(oldParentNode).onChange(element);
809 | droponOptions.onChange(element);
810 | }
811 | },
812 |
813 | unmark: function() {
814 | if(Sortable._marker) Sortable._marker.hide();
815 | },
816 |
817 | mark: function(dropon, position) {
818 | // mark on ghosting only
819 | var sortable = Sortable.options(dropon.parentNode);
820 | if(sortable && !sortable.ghosting) return;
821 |
822 | if(!Sortable._marker) {
823 | Sortable._marker =
824 | ($('dropmarker') || Element.extend(document.createElement('DIV'))).
825 | hide().addClassName('dropmarker').setStyle({position:'absolute'});
826 | document.getElementsByTagName("body").item(0).appendChild(Sortable._marker);
827 | }
828 | var offsets = Position.cumulativeOffset(dropon);
829 | Sortable._marker.setStyle({left: offsets[0]+'px', top: offsets[1] + 'px'});
830 |
831 | if(position=='after')
832 | if(sortable.overlap == 'horizontal')
833 | Sortable._marker.setStyle({left: (offsets[0]+dropon.clientWidth) + 'px'});
834 | else
835 | Sortable._marker.setStyle({top: (offsets[1]+dropon.clientHeight) + 'px'});
836 |
837 | Sortable._marker.show();
838 | },
839 |
840 | _tree: function(element, options, parent) {
841 | var children = Sortable.findElements(element, options) || [];
842 |
843 | for (var i = 0; i < children.length; ++i) {
844 | var match = children[i].id.match(options.format);
845 |
846 | if (!match) continue;
847 |
848 | var child = {
849 | id: encodeURIComponent(match ? match[1] : null),
850 | element: element,
851 | parent: parent,
852 | children: [],
853 | position: parent.children.length,
854 | container: $(children[i]).down(options.treeTag)
855 | };
856 |
857 | /* Get the element containing the children and recurse over it */
858 | if (child.container)
859 | this._tree(child.container, options, child);
860 |
861 | parent.children.push (child);
862 | }
863 |
864 | return parent;
865 | },
866 |
867 | tree: function(element) {
868 | element = $(element);
869 | var sortableOptions = this.options(element);
870 | var options = Object.extend({
871 | tag: sortableOptions.tag,
872 | treeTag: sortableOptions.treeTag,
873 | only: sortableOptions.only,
874 | name: element.id,
875 | format: sortableOptions.format
876 | }, arguments[1] || { });
877 |
878 | var root = {
879 | id: null,
880 | parent: null,
881 | children: [],
882 | container: element,
883 | position: 0
884 | };
885 |
886 | return Sortable._tree(element, options, root);
887 | },
888 |
889 | /* Construct a [i] index for a particular node */
890 | _constructIndex: function(node) {
891 | var index = '';
892 | do {
893 | if (node.id) index = '[' + node.position + ']' + index;
894 | } while ((node = node.parent) != null);
895 | return index;
896 | },
897 |
898 | sequence: function(element) {
899 | element = $(element);
900 | var options = Object.extend(this.options(element), arguments[1] || { });
901 |
902 | return $(this.findElements(element, options) || []).map( function(item) {
903 | return item.id.match(options.format) ? item.id.match(options.format)[1] : '';
904 | });
905 | },
906 |
907 | setSequence: function(element, new_sequence) {
908 | element = $(element);
909 | var options = Object.extend(this.options(element), arguments[2] || { });
910 |
911 | var nodeMap = { };
912 | this.findElements(element, options).each( function(n) {
913 | if (n.id.match(options.format))
914 | nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode];
915 | n.parentNode.removeChild(n);
916 | });
917 |
918 | new_sequence.each(function(ident) {
919 | var n = nodeMap[ident];
920 | if (n) {
921 | n[1].appendChild(n[0]);
922 | delete nodeMap[ident];
923 | }
924 | });
925 | },
926 |
927 | serialize: function(element) {
928 | element = $(element);
929 | var options = Object.extend(Sortable.options(element), arguments[1] || { });
930 | var name = encodeURIComponent(
931 | (arguments[1] && arguments[1].name) ? arguments[1].name : element.id);
932 |
933 | if (options.tree) {
934 | return Sortable.tree(element, arguments[1]).children.map( function (item) {
935 | return [name + Sortable._constructIndex(item) + "[id]=" +
936 | encodeURIComponent(item.id)].concat(item.children.map(arguments.callee));
937 | }).flatten().join('&');
938 | } else {
939 | return Sortable.sequence(element, arguments[1]).map( function(item) {
940 | return name + "[]=" + encodeURIComponent(item);
941 | }).join('&');
942 | }
943 | }
944 | };
945 |
946 | // Returns true if child is contained within element
947 | Element.isParent = function(child, element) {
948 | if (!child.parentNode || child == element) return false;
949 | if (child.parentNode == element) return true;
950 | return Element.isParent(child.parentNode, element);
951 | };
952 |
953 | Element.findChildren = function(element, only, recursive, tagName) {
954 | if(!element.hasChildNodes()) return null;
955 | tagName = tagName.toUpperCase();
956 | if(only) only = [only].flatten();
957 | var elements = [];
958 | $A(element.childNodes).each( function(e) {
959 | if(e.tagName && e.tagName.toUpperCase()==tagName &&
960 | (!only || (Element.classNames(e).detect(function(v) { return only.include(v) }))))
961 | elements.push(e);
962 | if(recursive) {
963 | var grandchildren = Element.findChildren(e, only, recursive, tagName);
964 | if(grandchildren) elements.push(grandchildren);
965 | }
966 | });
967 |
968 | return (elements.length>0 ? elements.flatten() : []);
969 | };
970 |
971 | Element.offsetSize = function (element, type) {
972 | return element['offset' + ((type=='vertical' || type=='height') ? 'Height' : 'Width')];
973 | };
--------------------------------------------------------------------------------
/html/javascripts/function.js:
--------------------------------------------------------------------------------
1 | // Image Rollover
2 | function initRollOverImages() {
3 | var image_cache = new Object();
4 | $(".rollover").each(function(i) {
5 | var imgsrc = this.src;
6 | var dot = this.src.lastIndexOf('.');
7 | var imgsrc_over = this.src.substr(0, dot) + '_over' + this.src.substr(dot, 4);
8 | image_cache[this.src] = new Image();
9 | image_cache[this.src].src = imgsrc_over;
10 | $(this).hover(
11 | function() { this.src = imgsrc_over; },
12 | function() { this.src = imgsrc; });
13 | });
14 | }
15 |
16 |
17 | // Smooth Scroll Setting
18 | jQuery.easing.quart = function (x, t, b, c, d) {
19 | return -c * ((t=t/d-1)*t*t*t - 1) + b;
20 | };
21 |
22 | // Smooth Scroll
23 | function smoothScroll() {
24 | $('a[href*=#]').click(function () {
25 | if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
26 | $(this).blur();
27 | var $target = $(this.hash);
28 | $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
29 | if ($target.length) {
30 | var targetOffset = $target.offset().top - 50;
31 | $('html,body').animate({scrollTop: targetOffset}, 600, 'quart');
32 | return false;
33 | }
34 | }
35 | });
36 | }
37 |
38 | function slideVisual(){
39 |
40 | $.featureList(
41 | $("#tabs li a"),
42 | $("#output li"), {
43 | start_item: 0
44 | }
45 | );
46 | }
47 |
48 | // ページコンテンツを読み込む関数
49 | function loadPage(pageName) {
50 | // fetch APIを使ってページの内容を取得
51 | fetch(pageName)
52 | .then(response => response.text())
53 | .then(html => {
54 | // 取得したHTMLをmain-areaに直接挿入
55 | $("#main-area").html(html);
56 |
57 | // お問い合わせページまたはプライバシーポリシーページの場合、特定の要素を非表示にする
58 | if (pageName === 'contact.html' || pageName === 'pp.html') {
59 | $("#sub-area, #visual, #navigation").hide();
60 | } else {
61 | // それ以外のページでは表示する
62 | $("#sub-area, #visual, #navigation").show();
63 | }
64 |
65 | // ページの一番上にスクロールする
66 | window.scrollTo(0, 0);
67 | })
68 | .catch(error => {
69 | console.error('コンテンツの読み込み中にエラーが発生しました:', error);
70 | });
71 | }
72 |
73 | //////////////////////////////////////////////////////
74 |
75 | $(document).ready(function() {
76 |
77 | smoothScroll();
78 | initRollOverImages();
79 | slideVisual();
80 |
81 | });
82 |
--------------------------------------------------------------------------------
/html/javascripts/jquery.featureList-1.0.0.js:
--------------------------------------------------------------------------------
1 | /*
2 | * FeatureList - simple and easy creation of an interactive "Featured Items" widget
3 | * Examples and documentation at: http://jqueryglobe.com/article/feature_list/
4 | * Version: 1.0.0 (01/09/2009)
5 | * Copyright (c) 2009 jQueryGlobe
6 | * Licensed under the MIT License: http://en.wikipedia.org/wiki/MIT_License
7 | * Requires: jQuery v1.3+
8 | */
9 | ;(function($) {
10 | $.fn.featureList = function(options) {
11 | var tabs = $(this);
12 | var output = $(options.output);
13 |
14 | new jQuery.featureList(tabs, output, options);
15 |
16 | return this;
17 | };
18 |
19 | $.featureList = function(tabs, output, options) {
20 | function slide(nr) {
21 | if (typeof nr == "undefined") {
22 | nr = visible_item + 1;
23 | nr = nr >= total_items ? 0 : nr;
24 | }
25 |
26 | tabs.removeClass('current').filter(":eq(" + nr + ")").addClass('current');
27 |
28 | output.stop(true, true).filter(":visible").fadeOut();
29 | output.filter(":eq(" + nr + ")").fadeIn(function() {
30 | visible_item = nr;
31 | });
32 | }
33 |
34 | var options = options || {};
35 | var total_items = tabs.length;
36 | var visible_item = options.start_item || 0;
37 |
38 | options.pause_on_hover = options.pause_on_hover || true;
39 | options.transition_interval = options.transition_interval || 5000;
40 |
41 | output.hide().eq( visible_item ).show();
42 | tabs.eq( visible_item ).addClass('current');
43 |
44 | tabs.click(function() {
45 | if ($(this).hasClass('current')) {
46 | return false;
47 | }
48 |
49 | slide( tabs.index( this) );
50 | });
51 |
52 | if (options.transition_interval > 0) {
53 | var timer = setInterval(function () {
54 | slide();
55 | }, options.transition_interval);
56 |
57 | if (options.pause_on_hover) {
58 | tabs.mouseenter(function() {
59 | clearInterval( timer );
60 |
61 | }).mouseleave(function() {
62 | clearInterval( timer );
63 | timer = setInterval(function () {
64 | slide();
65 | }, options.transition_interval);
66 | });
67 | }
68 | }
69 | };
70 | })(jQuery);
--------------------------------------------------------------------------------
/html/javascripts/js.cookie.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * JavaScript Cookie v2.1.1
3 | * https://github.com/js-cookie/js-cookie
4 | *
5 | * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
6 | * Released under the MIT license
7 | */
8 | ;(function (factory) {
9 | if (typeof define === 'function' && define.amd) {
10 | define(factory);
11 | } else if (typeof exports === 'object') {
12 | module.exports = factory();
13 | } else {
14 | var OldCookies = window.Cookies;
15 | var api = window.Cookies = factory();
16 | api.noConflict = function () {
17 | window.Cookies = OldCookies;
18 | return api;
19 | };
20 | }
21 | }(function () {
22 | function extend () {
23 | var i = 0;
24 | var result = {};
25 | for (; i < arguments.length; i++) {
26 | var attributes = arguments[ i ];
27 | for (var key in attributes) {
28 | result[key] = attributes[key];
29 | }
30 | }
31 | return result;
32 | }
33 |
34 | function init (converter) {
35 | function api (key, value, attributes) {
36 | var result;
37 | if (typeof document === 'undefined') {
38 | return;
39 | }
40 |
41 | // Write
42 |
43 | if (arguments.length > 1) {
44 | attributes = extend({
45 | path: '/'
46 | }, api.defaults, attributes);
47 |
48 | if (typeof attributes.expires === 'number') {
49 | var expires = new Date();
50 | expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5);
51 | attributes.expires = expires;
52 | }
53 |
54 | try {
55 | result = JSON.stringify(value);
56 | if (/^[\{\[]/.test(result)) {
57 | value = result;
58 | }
59 | } catch (e) {}
60 |
61 | if (!converter.write) {
62 | value = encodeURIComponent(String(value))
63 | .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
64 | } else {
65 | value = converter.write(value, key);
66 | }
67 |
68 | key = encodeURIComponent(String(key));
69 | key = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent);
70 | key = key.replace(/[\(\)]/g, escape);
71 |
72 | return (document.cookie = [
73 | key, '=', value,
74 | attributes.expires && '; expires=' + attributes.expires.toUTCString(), // use expires attribute, max-age is not supported by IE
75 | attributes.path && '; path=' + attributes.path,
76 | attributes.domain && '; domain=' + attributes.domain,
77 | attributes.secure ? '; secure' : ''
78 | ].join(''));
79 | }
80 |
81 | // Read
82 |
83 | if (!key) {
84 | result = {};
85 | }
86 |
87 | // To prevent the for loop in the first place assign an empty array
88 | // in case there are no cookies at all. Also prevents odd result when
89 | // calling "get()"
90 | var cookies = document.cookie ? document.cookie.split('; ') : [];
91 | var rdecode = /(%[0-9A-Z]{2})+/g;
92 | var i = 0;
93 |
94 | for (; i < cookies.length; i++) {
95 | var parts = cookies[i].split('=');
96 | var name = parts[0].replace(rdecode, decodeURIComponent);
97 | var cookie = parts.slice(1).join('=');
98 |
99 | if (cookie.charAt(0) === '"') {
100 | cookie = cookie.slice(1, -1);
101 | }
102 |
103 | try {
104 | cookie = converter.read ?
105 | converter.read(cookie, name) : converter(cookie, name) ||
106 | cookie.replace(rdecode, decodeURIComponent);
107 |
108 | if (this.json) {
109 | try {
110 | cookie = JSON.parse(cookie);
111 | } catch (e) {}
112 | }
113 |
114 | if (key === name) {
115 | result = cookie;
116 | break;
117 | }
118 |
119 | if (!key) {
120 | result[name] = cookie;
121 | }
122 | } catch (e) {}
123 | }
124 |
125 | return result;
126 | }
127 |
128 | api.set = api;
129 | api.get = function (key) {
130 | return api(key);
131 | };
132 | api.getJSON = function () {
133 | return api.apply({
134 | json: true
135 | }, [].slice.call(arguments));
136 | };
137 | api.defaults = {};
138 |
139 | api.remove = function (key, attributes) {
140 | api(key, '', extend(attributes, {
141 | expires: -1
142 | }));
143 | };
144 |
145 | api.withConverter = init;
146 |
147 | return api;
148 | }
149 |
150 | return init(function () {});
151 | }));
152 |
--------------------------------------------------------------------------------
/html/javascripts/liburls.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function(){
2 | var full_window_check_box = $('input#full_window');
3 | if (Cookies.get('full_window') == 'true') {
4 | full_window_check_box.prop('checked', true);
5 | setTimeout(function() {
6 | var liburl = $('div#library-page').data('liburl');
7 | if (Cookies.get('full_window') == 'true') {
8 | location.href = liburl;
9 | }
10 | }, 3000);
11 | } else {
12 | full_window_check_box.prop('checked', false);
13 | }
14 |
15 | full_window_check_box.change(function(){
16 | if ($(this).is(':checked')) {
17 | Cookies.set('full_window', 'true', { expires: 90 });
18 | } else {
19 | Cookies.remove('full_window');
20 | }
21 | });
22 | });
23 |
--------------------------------------------------------------------------------
/html/news.txt:
--------------------------------------------------------------------------------
1 | お知らせ: 本以外の商品ページでも検索のローディングアイコンが表示されてしまうバグを修正しました。
2 |
--------------------------------------------------------------------------------
/html/old.html:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | Libron(リブロン) – 図書館をもっと身近に
15 |
16 |
17 |
22 |
23 |
24 |
25 |
28 |
29 |
38 |
39 |
40 |
41 |
Libron とは?
42 |
43 |
44 |
2010/01/26 ver.1.96 滋賀県内県の図書館に対応しました。Firefox 3.6 に対応しました。
45 |
2010/01/15 ver.1.94 宮崎県の図書館(一部を除く。詳細)に対応しました。
46 |
2009/12/08 ver.1.93 大阪府Web-OPAC横断検索のURL変更に対応しました。
47 |
48 |
49 |
Libron は Amazon のページから最寄りの図書館(*)の蔵書を検索できる便利なツールです。
50 |
51 |
* 現在対応しているのは東京都、大阪府、京都府、神奈川県、千葉県、兵庫県、岐阜県、三重県、埼玉県内一部(川越市立図書館、川口市立図書館、越谷市立図書館、埼玉県立図書館、所沢市立所沢図書館、朝霞市立図書館、新座市立図書館、志木市立図書館、和光市立図書館)、新潟県(新潟市立図書館のみ)、宮崎県(一部を除く。
詳細)、滋賀県の図書館です。
52 |
53 |
54 |
1. 図書館を選択
55 |

56 |
57 |
58 |
59 |
2. 本を検索
60 |

61 |
62 |
63 |
64 |
3. 図書館のページにジャンプ
65 |

66 |
67 |
68 |
69 |
139 |
140 |
150 |
151 |
155 |
160 |
161 |
162 |
--------------------------------------------------------------------------------
/html/pp.html:
--------------------------------------------------------------------------------
1 |
2 | プライバシーポリシー
3 |
4 |
5 | 個人情報について
6 |
7 |
8 | 当サイトにおいて「個人情報」とは、氏名、住所、電話番号、電子メールアドレスなどユーザー個人を識別できる情報を指します。
9 | 個人情報は、当サイトのサービスに対する利用申し込みやお問い合わせなど、ユーザーが個人情報を送信することを了承した場合にのみ収集されます。
10 |
11 |
12 | 利用目的
13 |
14 |
15 | 収集したユーザーの個人情報は、次の目的のために使用し、その情報は厳重に管理します。
16 |
17 |
18 | - 当サイトにおけるサービスの提供・管理・運営のため
19 | - ユーザーが当サイトのサービスを利用するにあたり必要な連絡をするため
20 | - サービスの運営を目的とする個人情報が特定されない統計データを収集・作成送付するため
21 | - その他、お問合せに対する返答などを行うため
22 |
23 |
24 | 上記以外の目的に利用する必要が生じた場合は、事前にその旨を案内いたします。
25 |
26 |
27 | なお、個人情報の提供をご希望されない場合、提供を拒否することができます。
28 | しかしながらその場合、当サイトにおけるサービスをご利用できない場合がありますので、あらかじめご了承ください。
29 |
30 | 第三者への提供
31 |
32 |
33 | 弊社がユーザーの個人情報を利用又は第三者に開示するのは、下記の場合に限ります。
34 |
35 |
36 |
37 |
38 | - ユーザーが同意を与えた場合。
39 | - ユーザーと弊社が契約の当事者になった場合で、当該契約の準備又は履行のため必要な場合。
40 | - 弊社が従うべき法的義務のため必要な場合。
41 | - ユーザーの生命・健康・財産等の重大な利益を保護するため必要な場合。
42 | - 公共の利益の保護又は弊社若しくは個人情報の開示の対象となる第三者の法令に基づく権限行使のため必要な場合。
43 | - 弊社がユーザーの属性の集計、分析を行い、個人が識別・特定できないように加工したもの(以下「統計資料」と称します)を作成し、新規サービスの開発等の業務遂行のために利用、処理する場合。また、弊社が、統計資料を業務提携先等に提供する場合。
44 | - ユーザーの利益を侵害しない範囲内において、弊社及び個人情報の開示の対象となる第三者その他当事者の利益のため必要な場合。
45 |
46 |
47 |
48 | 個人情報の管理
49 |
50 |
51 | 弊社は、弊社の管理するシステムに格納された個人情報については、合理的な技術的施策、 および各従業員に対する啓発活動を行なうことにより、情報の紛失、改ざん、漏洩などの防止に努めます。
52 |
53 |
54 |
63 |
64 | お問合せ先
65 |
66 |
67 | 個人情報保護に関するお問い合わせについては、以下の窓口でお受けしています。
68 |
69 |
70 | 個人情報お問合せ窓口
71 |
72 |
--------------------------------------------------------------------------------
/html/robots.txt:
--------------------------------------------------------------------------------
1 | # See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
2 |
--------------------------------------------------------------------------------
/html/stylesheets/application.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Hiragino Maru Gothic Pro" ,"HG丸ゴシックM-PRO" ,verdana ,arial ,sans-serif;
3 | }
4 |
5 | .right {
6 | text-align: right;
7 | }
8 |
9 | .smallbox {
10 | padding:0.5em;margin-bottom:1.5em;background:#E5ECF9;
11 | }
12 |
13 | .border-bottom {
14 | padding-bottom: 3px;
15 | border-bottom: 5px solid #FAB13E;
16 | }
17 |
18 | .header {
19 | padding-top: 10px;
20 | }
21 |
22 | .spacer {
23 | margin-top: 40px;
24 | }
25 |
26 | .mini_spacer {
27 | margin-top: 20px;
28 | }
29 |
30 | .footer {
31 | border-top: 1px solid #ccc;
32 | padding-top: 3px;
33 | }
34 |
35 | .title {
36 | font-size: 14px;
37 | }
38 |
39 | .section {
40 | margin: 30px 0;
41 | }
42 |
43 | .less_margin_bottom {
44 | margin-bottom: 7px;
45 | }
46 |
47 | .twtr-widget h4 {
48 | color: #ffffff;
49 | font-weight: bold;
50 | }
51 |
--------------------------------------------------------------------------------
/html/stylesheets/blueprint/ie.css:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------
2 |
3 |
4 | Blueprint CSS Framework 0.8
5 | http://blueprintcss.org
6 |
7 | * Copyright (c) 2007-Present. See LICENSE for more info.
8 | * See README for instructions on how to use Blueprint.
9 | * For credits and origins, see AUTHORS.
10 | * This is a compressed file. See the sources in the 'src' directory.
11 |
12 | ----------------------------------------------------------------------- */
13 |
14 | /* ie.css */
15 | body {text-align:center;}
16 | .container {text-align:left;}
17 | * html .column, * html div.span-1, * html div.span-2, * html div.span-3, * html div.span-4, * html div.span-5, * html div.span-6, * html div.span-7, * html div.span-8, * html div.span-9, * html div.span-10, * html div.span-11, * html div.span-12, * html div.span-13, * html div.span-14, * html div.span-15, * html div.span-16, * html div.span-17, * html div.span-18, * html div.span-19, * html div.span-20, * html div.span-21, * html div.span-22, * html div.span-23, * html div.span-24 {overflow-x:hidden;}
18 | * html legend {margin:0px -8px 16px 0;padding:0;}
19 | ol {margin-left:2em;}
20 | sup {vertical-align:text-top;}
21 | sub {vertical-align:text-bottom;}
22 | html>body p code {*white-space:normal;}
23 | hr {margin:-8px auto 11px;}
24 | img {-ms-interpolation-mode:bicubic;}
25 | .clearfix, .container {display:inline-block;}
26 | * html .clearfix, * html .container {height:1%;}
27 | fieldset {padding-top:0;}
28 | input.text, input.title {background-color:#fff;border:1px solid #bbb;}
29 | input.text:focus, input.title:focus {border-color:#666;}
30 | input.text, input.title, textarea, select {margin:0.5em 0;}
31 | input.checkbox, input.radio {position:relative;top:.25em;}
32 | form.inline div, form.inline p {vertical-align:middle;}
33 | form.inline label {position:relative;top:-0.25em;}
34 | form.inline input.checkbox, form.inline input.radio, form.inline input.button, form.inline button {margin:0.5em 0;}
35 | button, input.button {position:relative;top:0.25em;}
--------------------------------------------------------------------------------
/html/stylesheets/blueprint/print.css:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------
2 |
3 |
4 | Blueprint CSS Framework 0.8
5 | http://blueprintcss.org
6 |
7 | * Copyright (c) 2007-Present. See LICENSE for more info.
8 | * See README for instructions on how to use Blueprint.
9 | * For credits and origins, see AUTHORS.
10 | * This is a compressed file. See the sources in the 'src' directory.
11 |
12 | ----------------------------------------------------------------------- */
13 |
14 | /* print.css */
15 | body {line-height:1.5;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;color:#000;background:none;font-size:10pt;}
16 | .container {background:none;}
17 | hr {background:#ccc;color:#ccc;width:100%;height:2px;margin:2em 0;padding:0;border:none;}
18 | hr.space {background:#fff;color:#fff;}
19 | h1, h2, h3, h4, h5, h6 {font-family:"Helvetica Neue", Arial, "Lucida Grande", sans-serif;}
20 | code {font:.9em "Courier New", Monaco, Courier, monospace;}
21 | img {float:left;margin:1.5em 1.5em 1.5em 0;}
22 | a img {border:none;}
23 | p img.top {margin-top:0;}
24 | blockquote {margin:1.5em;padding:1em;font-style:italic;font-size:.9em;}
25 | .small {font-size:.9em;}
26 | .large {font-size:1.1em;}
27 | .quiet {color:#999;}
28 | .hide {display:none;}
29 | a:link, a:visited {background:transparent;font-weight:700;text-decoration:underline;}
30 | a:link:after, a:visited:after {content:" (" attr(href) ")";font-size:90%;}
--------------------------------------------------------------------------------
/html/stylesheets/blueprint/screen.css:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------
2 |
3 |
4 | Blueprint CSS Framework 0.8
5 | http://blueprintcss.org
6 |
7 | * Copyright (c) 2007-Present. See LICENSE for more info.
8 | * See README for instructions on how to use Blueprint.
9 | * For credits and origins, see AUTHORS.
10 | * This is a compressed file. See the sources in the 'src' directory.
11 |
12 | ----------------------------------------------------------------------- */
13 |
14 | /* reset.css */
15 | html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;}
16 | body {line-height:1.5;}
17 | table {border-collapse:separate;border-spacing:0;}
18 | caption, th, td {text-align:left;font-weight:normal;}
19 | table, td, th {vertical-align:middle;}
20 | blockquote:before, blockquote:after, q:before, q:after {content:"";}
21 | blockquote, q {quotes:"" "";}
22 | a img {border:none;}
23 |
24 | /* typography.css */
25 | body {font-size:75%;color:#222;background:#fff;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;}
26 | h1, h2, h3, h4, h5, h6 {font-weight:normal;color:#111;}
27 | h1 {font-size:3em;line-height:1;margin-bottom:0.5em;}
28 | h2 {font-size:2em;margin-bottom:0.75em;}
29 | h3 {font-size:1.5em;line-height:1;margin-bottom:1em;}
30 | h4 {font-size:1.2em;line-height:1.25;margin-bottom:1.25em;}
31 | h5 {font-size:1em;font-weight:bold;margin-bottom:1.5em;}
32 | h6 {font-size:1em;font-weight:bold;}
33 | h1 img, h2 img, h3 img, h4 img, h5 img, h6 img {margin:0;}
34 | p {margin:0 0 1.5em;}
35 | p img.left {float:left;margin:1.5em 1.5em 1.5em 0;padding:0;}
36 | p img.right {float:right;margin:1.5em 0 1.5em 1.5em;}
37 | a:focus, a:hover {color:#000;}
38 | a {color:#009;text-decoration:underline;}
39 | blockquote {margin:1.5em;color:#666;font-style:italic;}
40 | strong {font-weight:bold;}
41 | em, dfn {font-style:italic;}
42 | dfn {font-weight:bold;}
43 | sup, sub {line-height:0;}
44 | abbr, acronym {border-bottom:1px dotted #666;}
45 | address {margin:0 0 1.5em;font-style:italic;}
46 | del {color:#666;}
47 | pre {margin:1.5em 0;white-space:pre;}
48 | pre, code, tt {font:1em 'andale mono', 'lucida console', monospace;line-height:1.5;}
49 | li ul, li ol {margin:0 1.5em;}
50 | ul, ol {margin:0 1.5em 1.5em 1.5em;}
51 | ul {list-style-type:disc;}
52 | ol {list-style-type:decimal;}
53 | dl {margin:0 0 1.5em 0;}
54 | dl dt {font-weight:bold;}
55 | dd {margin-left:1.5em;}
56 | table {margin-bottom:1.4em;width:100%;}
57 | th {font-weight:bold;}
58 | thead th {background:#c3d9ff;}
59 | th, td, caption {padding:4px 10px 4px 5px;}
60 | tr.even td {background:#e5ecf9;}
61 | tfoot {font-style:italic;}
62 | caption {background:#eee;}
63 | .small {font-size:.8em;margin-bottom:1.875em;line-height:1.875em;}
64 | .large {font-size:1.2em;line-height:2.5em;margin-bottom:1.25em;}
65 | .hide {display:none;}
66 | .quiet {color:#666;}
67 | .loud {color:#000;}
68 | .highlight {background:#ff0;}
69 | .added {background:#060;color:#fff;}
70 | .removed {background:#900;color:#fff;}
71 | .first {margin-left:0;padding-left:0;}
72 | .last {margin-right:0;padding-right:0;}
73 | .top {margin-top:0;padding-top:0;}
74 | .bottom {margin-bottom:0;padding-bottom:0;}
75 |
76 | /* forms.css */
77 | label {font-weight:bold;}
78 | fieldset {padding:1.4em;margin:0 0 1.5em 0;border:1px solid #ccc;}
79 | legend {font-weight:bold;font-size:1.2em;}
80 | input[type=text], input.text, input.title, textarea, select {background-color:#fff;border:1px solid #bbb;}
81 | input[type=text]:focus, input.text:focus, input.title:focus, textarea:focus, select:focus {border-color:#666;}
82 | input[type=text], input.text, input.title, textarea, select {margin:0.5em 0;}
83 | input.text, input.title {width:300px;padding:5px;}
84 | input.title {font-size:1.5em;}
85 | textarea {width:390px;height:250px;padding:5px;}
86 | input[type=checkbox], input[type=radio], input.checkbox, input.radio {position:relative;top:.25em;}
87 | form.inline {line-height:3;}
88 | form.inline p {margin-bottom:0;}
89 | .error, .notice, .success {padding:.8em;margin-bottom:1em;border:2px solid #ddd;}
90 | .error {background:#FBE3E4;color:#8a1f11;border-color:#FBC2C4;}
91 | .notice {background:#FFF6BF;color:#514721;border-color:#FFD324;}
92 | .success {background:#E6EFC2;color:#264409;border-color:#C6D880;}
93 | .error a {color:#8a1f11;}
94 | .notice a {color:#514721;}
95 | .success a {color:#264409;}
96 |
97 | /* grid.css */
98 | .container {width:950px;margin:0 auto;}
99 | .showgrid {background:url(src/grid.png);}
100 | .column, div.span-1, div.span-2, div.span-3, div.span-4, div.span-5, div.span-6, div.span-7, div.span-8, div.span-9, div.span-10, div.span-11, div.span-12, div.span-13, div.span-14, div.span-15, div.span-16, div.span-17, div.span-18, div.span-19, div.span-20, div.span-21, div.span-22, div.span-23, div.span-24 {float:left;margin-right:10px;}
101 | .last, div.last {margin-right:0;}
102 | .span-1 {width:30px;}
103 | .span-2 {width:70px;}
104 | .span-3 {width:110px;}
105 | .span-4 {width:150px;}
106 | .span-5 {width:190px;}
107 | .span-6 {width:230px;}
108 | .span-7 {width:270px;}
109 | .span-8 {width:310px;}
110 | .span-9 {width:350px;}
111 | .span-10 {width:390px;}
112 | .span-11 {width:430px;}
113 | .span-12 {width:470px;}
114 | .span-13 {width:510px;}
115 | .span-14 {width:550px;}
116 | .span-15 {width:590px;}
117 | .span-16 {width:630px;}
118 | .span-17 {width:670px;}
119 | .span-18 {width:710px;}
120 | .span-19 {width:750px;}
121 | .span-20 {width:790px;}
122 | .span-21 {width:830px;}
123 | .span-22 {width:870px;}
124 | .span-23 {width:910px;}
125 | .span-24, div.span-24 {width:950px;margin:0;}
126 | input.span-1, textarea.span-1, input.span-2, textarea.span-2, input.span-3, textarea.span-3, input.span-4, textarea.span-4, input.span-5, textarea.span-5, input.span-6, textarea.span-6, input.span-7, textarea.span-7, input.span-8, textarea.span-8, input.span-9, textarea.span-9, input.span-10, textarea.span-10, input.span-11, textarea.span-11, input.span-12, textarea.span-12, input.span-13, textarea.span-13, input.span-14, textarea.span-14, input.span-15, textarea.span-15, input.span-16, textarea.span-16, input.span-17, textarea.span-17, input.span-18, textarea.span-18, input.span-19, textarea.span-19, input.span-20, textarea.span-20, input.span-21, textarea.span-21, input.span-22, textarea.span-22, input.span-23, textarea.span-23, input.span-24, textarea.span-24 {border-left-width:1px!important;border-right-width:1px!important;padding-left:5px!important;padding-right:5px!important;}
127 | input.span-1, textarea.span-1 {width:18px!important;}
128 | input.span-2, textarea.span-2 {width:58px!important;}
129 | input.span-3, textarea.span-3 {width:98px!important;}
130 | input.span-4, textarea.span-4 {width:138px!important;}
131 | input.span-5, textarea.span-5 {width:178px!important;}
132 | input.span-6, textarea.span-6 {width:218px!important;}
133 | input.span-7, textarea.span-7 {width:258px!important;}
134 | input.span-8, textarea.span-8 {width:298px!important;}
135 | input.span-9, textarea.span-9 {width:338px!important;}
136 | input.span-10, textarea.span-10 {width:378px!important;}
137 | input.span-11, textarea.span-11 {width:418px!important;}
138 | input.span-12, textarea.span-12 {width:458px!important;}
139 | input.span-13, textarea.span-13 {width:498px!important;}
140 | input.span-14, textarea.span-14 {width:538px!important;}
141 | input.span-15, textarea.span-15 {width:578px!important;}
142 | input.span-16, textarea.span-16 {width:618px!important;}
143 | input.span-17, textarea.span-17 {width:658px!important;}
144 | input.span-18, textarea.span-18 {width:698px!important;}
145 | input.span-19, textarea.span-19 {width:738px!important;}
146 | input.span-20, textarea.span-20 {width:778px!important;}
147 | input.span-21, textarea.span-21 {width:818px!important;}
148 | input.span-22, textarea.span-22 {width:858px!important;}
149 | input.span-23, textarea.span-23 {width:898px!important;}
150 | input.span-24, textarea.span-24 {width:938px!important;}
151 | .append-1 {padding-right:40px;}
152 | .append-2 {padding-right:80px;}
153 | .append-3 {padding-right:120px;}
154 | .append-4 {padding-right:160px;}
155 | .append-5 {padding-right:200px;}
156 | .append-6 {padding-right:240px;}
157 | .append-7 {padding-right:280px;}
158 | .append-8 {padding-right:320px;}
159 | .append-9 {padding-right:360px;}
160 | .append-10 {padding-right:400px;}
161 | .append-11 {padding-right:440px;}
162 | .append-12 {padding-right:480px;}
163 | .append-13 {padding-right:520px;}
164 | .append-14 {padding-right:560px;}
165 | .append-15 {padding-right:600px;}
166 | .append-16 {padding-right:640px;}
167 | .append-17 {padding-right:680px;}
168 | .append-18 {padding-right:720px;}
169 | .append-19 {padding-right:760px;}
170 | .append-20 {padding-right:800px;}
171 | .append-21 {padding-right:840px;}
172 | .append-22 {padding-right:880px;}
173 | .append-23 {padding-right:920px;}
174 | .prepend-1 {padding-left:40px;}
175 | .prepend-2 {padding-left:80px;}
176 | .prepend-3 {padding-left:120px;}
177 | .prepend-4 {padding-left:160px;}
178 | .prepend-5 {padding-left:200px;}
179 | .prepend-6 {padding-left:240px;}
180 | .prepend-7 {padding-left:280px;}
181 | .prepend-8 {padding-left:320px;}
182 | .prepend-9 {padding-left:360px;}
183 | .prepend-10 {padding-left:400px;}
184 | .prepend-11 {padding-left:440px;}
185 | .prepend-12 {padding-left:480px;}
186 | .prepend-13 {padding-left:520px;}
187 | .prepend-14 {padding-left:560px;}
188 | .prepend-15 {padding-left:600px;}
189 | .prepend-16 {padding-left:640px;}
190 | .prepend-17 {padding-left:680px;}
191 | .prepend-18 {padding-left:720px;}
192 | .prepend-19 {padding-left:760px;}
193 | .prepend-20 {padding-left:800px;}
194 | .prepend-21 {padding-left:840px;}
195 | .prepend-22 {padding-left:880px;}
196 | .prepend-23 {padding-left:920px;}
197 | div.border {padding-right:4px;margin-right:5px;border-right:1px solid #eee;}
198 | div.colborder {padding-right:24px;margin-right:25px;border-right:1px solid #eee;}
199 | .pull-1 {margin-left:-40px;}
200 | .pull-2 {margin-left:-80px;}
201 | .pull-3 {margin-left:-120px;}
202 | .pull-4 {margin-left:-160px;}
203 | .pull-5 {margin-left:-200px;}
204 | .pull-6 {margin-left:-240px;}
205 | .pull-7 {margin-left:-280px;}
206 | .pull-8 {margin-left:-320px;}
207 | .pull-9 {margin-left:-360px;}
208 | .pull-10 {margin-left:-400px;}
209 | .pull-11 {margin-left:-440px;}
210 | .pull-12 {margin-left:-480px;}
211 | .pull-13 {margin-left:-520px;}
212 | .pull-14 {margin-left:-560px;}
213 | .pull-15 {margin-left:-600px;}
214 | .pull-16 {margin-left:-640px;}
215 | .pull-17 {margin-left:-680px;}
216 | .pull-18 {margin-left:-720px;}
217 | .pull-19 {margin-left:-760px;}
218 | .pull-20 {margin-left:-800px;}
219 | .pull-21 {margin-left:-840px;}
220 | .pull-22 {margin-left:-880px;}
221 | .pull-23 {margin-left:-920px;}
222 | .pull-24 {margin-left:-960px;}
223 | .pull-1, .pull-2, .pull-3, .pull-4, .pull-5, .pull-6, .pull-7, .pull-8, .pull-9, .pull-10, .pull-11, .pull-12, .pull-13, .pull-14, .pull-15, .pull-16, .pull-17, .pull-18, .pull-19, .pull-20, .pull-21, .pull-22, .pull-23, .pull-24 {float:left;position:relative;}
224 | .push-1 {margin:0 -40px 1.5em 40px;}
225 | .push-2 {margin:0 -80px 1.5em 80px;}
226 | .push-3 {margin:0 -120px 1.5em 120px;}
227 | .push-4 {margin:0 -160px 1.5em 160px;}
228 | .push-5 {margin:0 -200px 1.5em 200px;}
229 | .push-6 {margin:0 -240px 1.5em 240px;}
230 | .push-7 {margin:0 -280px 1.5em 280px;}
231 | .push-8 {margin:0 -320px 1.5em 320px;}
232 | .push-9 {margin:0 -360px 1.5em 360px;}
233 | .push-10 {margin:0 -400px 1.5em 400px;}
234 | .push-11 {margin:0 -440px 1.5em 440px;}
235 | .push-12 {margin:0 -480px 1.5em 480px;}
236 | .push-13 {margin:0 -520px 1.5em 520px;}
237 | .push-14 {margin:0 -560px 1.5em 560px;}
238 | .push-15 {margin:0 -600px 1.5em 600px;}
239 | .push-16 {margin:0 -640px 1.5em 640px;}
240 | .push-17 {margin:0 -680px 1.5em 680px;}
241 | .push-18 {margin:0 -720px 1.5em 720px;}
242 | .push-19 {margin:0 -760px 1.5em 760px;}
243 | .push-20 {margin:0 -800px 1.5em 800px;}
244 | .push-21 {margin:0 -840px 1.5em 840px;}
245 | .push-22 {margin:0 -880px 1.5em 880px;}
246 | .push-23 {margin:0 -920px 1.5em 920px;}
247 | .push-24 {margin:0 -960px 1.5em 960px;}
248 | .push-1, .push-2, .push-3, .push-4, .push-5, .push-6, .push-7, .push-8, .push-9, .push-10, .push-11, .push-12, .push-13, .push-14, .push-15, .push-16, .push-17, .push-18, .push-19, .push-20, .push-21, .push-22, .push-23, .push-24 {float:right;position:relative;}
249 | .prepend-top {margin-top:1.5em;}
250 | .append-bottom {margin-bottom:1.5em;}
251 | .box {padding:1.5em;margin-bottom:1.5em;background:#E5ECF9;}
252 | hr {background:#ddd;color:#ddd;clear:both;float:none;width:100%;height:.1em;margin:0 0 1.45em;border:none;}
253 | hr.space {background:#fff;color:#fff;}
254 | .clearfix:after, .container:after {content:"\0020";display:block;height:0;clear:both;visibility:hidden;overflow:hidden;}
255 | .clearfix, .container {display:block;}
256 | .clear {clear:both;}
--------------------------------------------------------------------------------
/html/stylesheets/home.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | home.css
4 |
5 | */
6 |
7 |
8 | #home #contents {
9 | margin-top: 10px;
10 | }
11 |
12 | .left {
13 | float:left;
14 | }
15 |
16 | /* ----------------------
17 | visual
18 | ---------------------- */
19 | #visual {
20 | position: relative;
21 | background: url(/images/images-home/visual_bg.png) top left no-repeat;
22 | width: 920px;
23 | height: 270px;
24 | left: -8px;
25 | }
26 |
27 | #visual ul {
28 | position: absolute;
29 | top: 0;
30 | list-style: none;
31 | padding: 0;
32 | margin: 0;
33 | }
34 |
35 | /* description */
36 | #visual .description {
37 | width: 218px;
38 | position: absolute;
39 | top: 30px;
40 | left: 675px;
41 | }
42 |
43 | #visual .description h1 {
44 | font-weight: bold;
45 | font-size: 123.1%;
46 | color: #333;
47 | }
48 |
49 | #visual .description p.lead {
50 | color: #333;
51 | font-size: 93%;
52 | margin: 5px 0;
53 | }
54 |
55 | #visual .description p.area {
56 | color: #777777;
57 | font-size: 85%;
58 | line-height: 1.5;
59 | }
60 | *+html #visual .description p.area { font-size: 70%; line-height: 1.7; }
61 | * html #visual .description p.area { font-size: 70%; line-height: 1.7; }
62 |
63 | #visual .description p.area strong {
64 | color: #333;
65 | font-size: 116%;
66 | }
67 |
68 | /* --- select button --- */
69 | ul#tabs {
70 | z-index: 2;
71 | top: 248px !important;
72 | left: 26px;
73 | }
74 |
75 | ul#tabs li {
76 | float: left;
77 | margin-right: 5px;
78 | font-size: 0px;
79 | }
80 |
81 | ul#tabs li a {
82 | text-indent: -9999px;
83 | text-decoration: none;
84 | outline: none;
85 | width: 20px;
86 | height: 5px;
87 | display: block;
88 | background: #ccc;
89 | }
90 |
91 | ul#tabs li a:hover {
92 | background: #ffa200;
93 | }
94 |
95 | ul#tabs li a.current {
96 | background: #ffa200;
97 | }
98 |
99 |
100 | /* --- output --- */
101 | ul#output {
102 | top: 10px;
103 | left: 10px;
104 | width: 650px;
105 | height: 250px;
106 | overflow: hidden;
107 | position: relative;
108 | }
109 |
110 |
111 |
112 | /* ----------------------
113 | navigation
114 | ---------------------- */
115 | #home #navigation li {
116 | float: left;
117 | margin-right: 6px;
118 | margin-top: 8px;
119 | position: relative;
120 | }
121 |
122 | #home #navigation li.last { margin-right: 0; }
123 |
124 | #home #navigation span {
125 | position: absolute;
126 | bottom: 7px;
127 | right: 58px;
128 | font-family: helvetica,arial,sans-serif;
129 | font-size: 9px;
130 | color: #765f34;
131 | }
132 | * html #home #navigation span { bottom: 6px; }
133 |
134 | #home #navigation li:hover span { color: #553802; }
135 |
136 |
137 | /* Download Buttons */
138 | #home #navigation .download {
139 | width: 240px;
140 | margin: 2px 0 0 1px;
141 | }
142 |
143 | #home #navigation .download li {
144 | float:left;
145 | margin: 0;
146 | }
147 |
148 | #home #navigation .download li.even {
149 | margin-left: 4px;
150 | }
151 |
152 | #home #navigation .download li.upperline {
153 | margin-bottom: 3px;
154 | }
155 |
156 |
157 | /* ----------------------
158 | main-area
159 | ---------------------- */
160 | #home .wrapper { position: relative; margin-top: 18px; }
161 |
162 | #main-area {
163 | margin: 0 0 0 2px;
164 | width: 650px;
165 | }
166 |
167 |
168 | #home .news {
169 | padding: 10px;
170 | border: 1px solid #cbc6bd;
171 | background: #e8e4db;
172 | -moz-border-radius: 5px;
173 | -webkit-border-radius: 5px;
174 | }
175 |
176 | #home .news h2 {
177 | font-weight: bold;
178 | font-size: 108%;
179 | color: #3e2f12;
180 | border-bottom: 1px solid #cbc6bd;
181 | padding-bottom: 8px;
182 | margin-bottom: 8px;
183 | }
184 | *+html #home .news h2 { font-size: 100%; }
185 | * html #home .news h2 { font-size: 100%; }
186 |
187 | #home .news dl { font-size: 93%; }
188 | #home .news dt { font-weight: bold; }
189 | #home .news dd { margin-bottom: 0.5em; }
190 |
191 | .bold {
192 | font-weight: bold;
193 | }
194 |
195 |
196 | /* ===========================
197 | widgets
198 | =========================== */
199 | #twitter-widget,
200 | #review-poster {
201 | margin-top: 19px;
202 | width: 320px;
203 | margin-right: 10px;
204 | float: left;
205 | }
206 |
207 | #review-poster {
208 | margin-right: 0;
209 | }
210 |
211 | /* --- twitter-widget --- */
212 | .twtr-tweet-wrap .twtr-tweet-text p { line-height: 1.4 !important; }
213 | #twitter-widget h4 { font-weight: bold; }
214 |
215 |
216 | /* --- review-poster --- */
217 | #review-poster { font-size: 93%; }
218 |
219 | #reviewposter_title {
220 | background: url(/images/images-home/reviewposter_header.png) no-repeat;
221 | padding: 5px;
222 | color: #fff;
223 | text-align:center;
224 | }
225 |
226 | #reviewposter_itembox {
227 | border-left: 1px #ccc solid;
228 | border-right:1px #ccc solid;
229 | text-align:left;
230 | padding:2px 4px;
231 | background: #fff;
232 | }
233 |
234 | #reviewposter_itemlist {
235 | margin: 0 0 2px 16px;
236 | padding: 0;
237 | }
238 |
239 | #reviewposter_itemlist li {
240 | list-style: disc;
241 | margin-top: 5px;
242 | }
243 |
244 | #facebook_like_box {
245 | margin-bottom: 7px;
246 | }
247 |
248 | /* social buttons */
249 | div.social_buttons {
250 | padding-top:10px;
251 | /* padding-top:54px;*/
252 | }
253 |
254 | div.social_buttons div {
255 | float:left;
256 | }
257 |
258 | .animation {
259 | margin-top: 20px;
260 | margin-bottom: 20px;
261 | }
262 |
--------------------------------------------------------------------------------
/html/stylesheets/import.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | @import url("screen.css");
4 | @import url("home.css");
5 | @import url("subpage.css");
6 |
--------------------------------------------------------------------------------
/html/stylesheets/old.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Hiragino Maru Gothic Pro" ,"HG丸ゴシックM-PRO" ,verdana ,arial ,sans-serif;
3 | }
4 |
5 | .right {
6 | text-align: right;
7 | }
8 |
9 | .smallbox {
10 | padding:0.5em;margin-bottom:1.5em;background:#E5ECF9;
11 | }
12 |
13 | .border-bottom {
14 | padding-bottom: 3px;
15 | border-bottom: 5px solid #FAB13E;
16 | }
17 |
18 | .header {
19 | padding-top: 10px;
20 | }
21 |
22 | .spacer {
23 | margin-top: 40px;
24 | }
25 |
26 | .mini_spacer {
27 | margin-top: 20px;
28 | }
29 |
30 | .footer {
31 | border-top: 1px solid #ccc;
32 | padding-top: 3px;
33 | }
34 |
35 | .title {
36 | font-size: 14px;
37 | }
38 |
39 | .section {
40 | margin: 30px 0;
41 | }
42 |
43 | .less_margin_bottom {
44 | margin-bottom: 7px;
45 | }
46 |
47 | .twtr-widget h4 {
48 | color: #ffffff;
49 | font-weight: bold;
50 | }
51 |
52 |
--------------------------------------------------------------------------------
/html/stylesheets/screen.css:
--------------------------------------------------------------------------------
1 | @charset "utf-8";
2 |
3 | /*
4 | Copyright (c) 2009, Yahoo! Inc. All rights reserved.
5 | Code licensed under the BSD License:
6 | http://developer.yahoo.net/yui/license.txt
7 | version: 2.7.0
8 | */
9 | html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var,optgroup{font-style:inherit;font-weight:inherit;}del,ins{text-decoration:none;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:baseline;}sub{vertical-align:baseline;}legend{color:#000;}input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;}input,button,textarea,select{*font-size:100%;}body{font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}select,input,button,textarea,button{font:99% arial,helvetica,clean,sans-serif;}table{font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}
10 |
11 |
12 |
13 |
14 | /* =============================================
15 |
16 | Base
17 |
18 | ============================================= */
19 |
20 | html {
21 | color: #3e2f12;
22 | font-family: Meiryo,'メイリオ','Lucida Grande',Verdana,'Hiragino Kaku Gothic Pro','ヒラギノ角ゴ Pro W3','MS Pゴシック',sans-serif;
23 | background: #efece6 url(../images/bg.png);
24 | }
25 |
26 | body { line-height: 1.5; }
27 |
28 | #container {
29 | width: 904px;
30 | margin: 0 auto;
31 | }
32 |
33 | .clearfix:after {
34 | height: 0;
35 | visibility: hidden;
36 | content: ".";
37 | display: block;
38 | clear: both;
39 | }
40 | .clearfix { display: inline-block; }
41 |
42 |
43 | /* link setting */
44 | a:link { color: #1d507f; text-decoration: underline; }
45 | a:visited { color: #3d74a7; text-decoration: underline; }
46 | a:hover { color: #1d507f; text-decoration: none; }
47 | a:active { text-decoration: none; }
48 |
49 |
50 | /* Inline Elements */
51 | img { vertical-align: bottom; }
52 | strong { font-weight: bold; }
53 | em { color: #cc0000; font-style: normal; }
54 | abbr,acronym { border-bottom: 1px dashed #666; cursor: help;}
55 | label { cursor: help;}
56 |
57 |
58 | /* Block Elements */
59 | .section { margin-bottom: 50px; position: relative; }
60 | h1,h2,h3,h4,h5 { clear: both; }
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 | /* =============================================
70 |
71 | Modules
72 |
73 | ============================================= */
74 |
75 |
76 | /* ----------------------------------------
77 |
78 | Header
79 |
80 | ---------------------------------------- */
81 | #header {
82 | width: 902px;
83 | margin: 20px 2px 0;
84 | position: relative;
85 | }
86 |
87 | #header .logo {
88 | position: relative;
89 | left: -2px;
90 | }
91 |
92 | #header #amazon-widget {
93 | position: absolute;
94 | top: 10px;
95 | right: 0;
96 | }
97 |
98 | #header #navigation {
99 | /*margin: 87px 0 0;*/
100 | margin: 37px 0 0;
101 | padding-top: 1px;
102 | background: url(../images/nav_bg.png) no-repeat;
103 | height: 42px;
104 | clear: left;
105 | }
106 |
107 | #header #navigation li {
108 | float: left;
109 | }
110 |
111 |
112 |
113 | /* ----------------------------------------
114 |
115 | Contents
116 |
117 | ---------------------------------------- */
118 | #contents {
119 | width: 100%;
120 | margin-top: 20px;
121 | position: relative;
122 | }
123 |
124 |
125 |
126 | /* Main Area
127 | --------------------------------------------- */
128 | #main-area { font-size: 108%; }
129 | #main-area h1 { margin-bottom: 20px; }
130 |
131 |
132 | div.banners {
133 | clear: both;
134 | padding: 20px 0;
135 | }
136 |
137 | div.banners p {
138 | box-shadow: 0 1px 3px rgba(0,0,0,.1);
139 | margin-bottom: 10px;
140 | }
141 |
142 |
143 | /* Download Area
144 | --------------------------------------------- */
145 | .download-area {
146 | margin-top:1px;
147 | margin-bottom: 20px;
148 | padding: 10px;
149 | border: 1px solid #cbc6bd;
150 | background: #e8e4db;
151 | -moz-border-radius: 5px;
152 | -webkit-border-radius: 5px;
153 | width: 220px;
154 | height: 70px;
155 | }
156 |
157 | /* Sub Area
158 | --------------------------------------------- */
159 | #sub-area {
160 | position: absolute;
161 | top: 0;
162 | width: 240px;
163 | left: 662px;
164 | }
165 |
166 | #sub-area .section {
167 | margin-bottom: 20px;
168 | padding: 10px;
169 | border: 1px solid #cbc6bd;
170 | background: #e8e4db;
171 | -moz-border-radius: 5px;
172 | -webkit-border-radius: 5px;
173 | }
174 |
175 | #sub-area .section h2 {
176 | margin: 0 0 5px 2px;
177 | }
178 |
179 | #sub-area .section p {
180 | padding: 0 5px;
181 | margin-bottom: 0.8em;
182 | line-height: 1.4 !important;
183 | }
184 |
185 | #sub-area .section p.btn {
186 | text-align: center;
187 | }
188 |
189 |
190 | /* --- link and bookmark --- */
191 | #sub-area ul {
192 | margin: 0 10px;
193 | }
194 |
195 | #sub-area ul li {
196 | float: left;
197 | margin-right: 5px;
198 | margin-bottom: 10px;
199 | }
200 |
201 | #sub-area ul li.addclip { margin-right: 10px; }
202 |
203 |
204 | /* --- download button --- */
205 | #download {
206 | margin: 0 0 20px -2px !important;
207 | _margin: 0 0 20px 0px !important;
208 | height:93px;
209 | }
210 |
211 | #download li {
212 | margin:0 1px 0 0 !important;
213 | _margin:0 0px 0 0 !important;
214 | }
215 |
216 | #download .last {
217 | margin: 0 !important;
218 | }
219 |
220 | /* library page */
221 | div#library-page div.left{
222 | width:20%;
223 | float:left;
224 | }
225 |
226 | div#library-page div.right{
227 | margin-top:2px;
228 | width:80%;
229 | float:left;
230 | }
231 |
232 | div#library-page h2 {
233 | font-weight:bold;
234 | font-size: 16px;
235 | margin-bottom: 3px;
236 | }
237 |
238 | div#library-page p {
239 | margin: 0 3px 10px 0;
240 | }
241 |
242 | div.iphone-banner {
243 | margin-top: 30px;
244 | }
245 |
246 | div#library-page div.nav {
247 | margin-bottom: 10px;
248 | display: table;
249 | }
250 |
251 | div.nav img {
252 | vertical-align: -4px;
253 | }
254 |
255 | div.nav div {
256 | float:left;
257 | margin-right: 12px;
258 | }
259 |
260 | /* ----------------------------------------
261 |
262 | Footer
263 |
264 | ---------------------------------------- */
265 | #footer {
266 | clear: both;
267 | margin: 70px 2px 50px;
268 | padding: 10px 0 0;
269 | font-size: 77%;
270 | position: relative;
271 | border-top: 1px solid #cbc6bd;
272 | line-height: 1.7;
273 | }
274 |
275 | #footer address {
276 | float: left;
277 | font-style: normal;
278 | }
279 |
280 | #footer ul {
281 | text-align: right;
282 | }
283 |
284 | *+html #footer ul { font-size: 85%; }
285 | * html #footer ul { font-size: 85%; }
286 |
287 | #footer a:link { text-decoration: none; }
288 | #footer a:visited { text-decoration: none; }
289 | #footer a:hover { text-decoration: underline; }
290 | #footer a:active { text-decoration: underline; }
291 |
292 |
293 |
294 | /* =============================================
295 |
296 | extra
297 |
298 | ============================================= */
299 |
300 | /* 上余白 */
301 | .mt0 { margin-top:0 !important; }
302 | .mt10{ margin-top:10px !important; }
303 | .mt20{ margin-top:20px !important; }
304 | .mt30{ margin-top:30px !important; }
305 | .mt40{ margin-top:40px !important; }
306 | .mt50{ margin-top:50px !important; }
307 | .mt60{ margin-top:60px !important; }
308 | .mt70{ margin-top:70px !important; }
309 | .mt80{ margin-top:80px !important; }
310 | .mt90{ margin-top:90px !important; }
311 | .mt100{ margin-top:100px !important; }
312 |
313 | /* 下余白 */
314 | .mb0 { margin-bottom:0 !important; }
315 | .mb10{ margin-bottom:10px !important; }
316 | .mb20{ margin-bottom:20px !important; }
317 | .mb30{ margin-bottom:30px !important; }
318 |
319 |
320 | /* 左余白 */
321 | .ml0 { margin-left:0 !important; }
322 | .ml10{ margin-left:10px !important; }
323 | .ml20{ margin-left:20px !important; }
324 | .ml30{ margin-left:30px !important; }
325 |
326 | /* 右余白 */
327 | .mr0 { margin-right:0 !important;}
328 | .mr10{ margin-right:10px !important; }
329 | .mr20{ margin-right:20px !important; }
330 | .mr30{ margin-right:30px !important; }
331 |
332 |
333 | /* ボックス幅 */
334 | .w177{ width: 177px !important; }
335 |
336 | .w100{ width: 200px !important; }
337 | .w150{ width: 200px !important; }
338 | .w200{ width: 200px !important; }
339 | .w250{ width: 250px !important; }
340 | .w300{ width: 300px !important; }
341 | .w350{ width: 350px !important; }
342 | .w400{ width: 400px !important; }
343 | .w450{ width: 450px !important; }
344 |
345 |
346 | /* フォントサイズ */
347 | .font-xs { font-size: 77%; }
348 | .font-s { font-size: 85%; }
349 | .font-m { font-size: 100%; }
--------------------------------------------------------------------------------
/html/stylesheets/subpage.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | subpage.css
4 |
5 | */
6 |
7 | .flow h2 {
8 | margin: 2em 0 13px;
9 | padding-left: 42px;
10 | line-height: 39px;
11 | color: #3e2f12;
12 | font-weight: bold;
13 | }
14 |
15 | .flow h2.num1 { background: url(../images/images-subpage/h2bg_1.png) no-repeat; }
16 | .flow h2.num2 { background: url(../images/images-subpage/h2bg_2.png) no-repeat; }
17 | .flow h2.num3 { background: url(../images/images-subpage/h2bg_3.png) no-repeat; }
18 | .flow h2.num4 { background: url(../images/images-subpage/h2bg_4.png) no-repeat; }
19 | .flow h2.num5 { background: url(../images/images-subpage/h2bg_5.png) no-repeat; }
20 | .flow h2.num6 { background: url(../images/images-subpage/h2bg_6.png) no-repeat; }
21 | .flow h2.num7 { background: url(../images/images-subpage/h2bg_7.png) no-repeat; }
22 | .flow h2.num8 { background: url(../images/images-subpage/h2bg_8.png) no-repeat; }
23 | .flow h2.num9 { background: url(../images/images-subpage/h2bg_9.png) no-repeat; }
24 |
25 | .flow p { margin: 0 6px 0; width: 610px; }
26 |
27 |
28 |
29 | .message-for-chromeuser {
30 | color: #6b6964;
31 | font-size: 93%;
32 | width: 500px !important;
33 | }
34 |
35 |
36 | .float1-2 {}
37 | .float1-2 .left {
38 | width: auto;
39 | float: left;
40 | }
41 |
42 | .float1-2 .right {
43 | width: auto;
44 | margin-left: 110px;
45 | }
46 |
47 |
48 | #main-area p {
49 | margin-bottom: 1em;
50 | }
51 |
52 | #main-area .aside {
53 | margin: 1em 10px 2em;
54 | padding: 20px;
55 | background: #e8e4db;
56 | border: 1px solid #cbc6bd;
57 | }
58 |
59 | #main-area .aside p:last-of-type { margin-bottom: 0; }
60 |
61 | .for-firefox-user,
62 | .for-chrome-user,
63 | .for-safari-user,
64 | .for-iphone-user
65 | {
66 | margin-top: 20px;
67 | padding-top: 30px;
68 | background: url(../images/divider.png) top left no-repeat;
69 | }
70 |
71 | #subpage .news {
72 | padding: 10px;
73 | border: 1px solid #cbc6bd;
74 | background: #e8e4db;
75 | -moz-border-radius: 5px;
76 | -webkit-border-radius: 5px;
77 | margin-bottom:20px;
78 | }
79 |
80 | #subpage .news h2 {
81 | font-weight: bold;
82 | font-size: 108%;
83 | color: #3e2f12;
84 | border-bottom: 1px solid #cbc6bd;
85 | padding-bottom: 8px;
86 | margin-bottom: 8px;
87 | }
88 | *+html #subpage .news h2 { font-size: 100%; }
89 | * html #subpage .news h2 { font-size: 100%; }
90 |
91 | #subpage .news dl { font-size: 93%; }
92 | #subpage .news dt { font-weight: bold; }
93 | #subpage .news dd { margin-bottom: 0.5em; }
94 |
--------------------------------------------------------------------------------
/html/usage.html:
--------------------------------------------------------------------------------
1 | 
2 |
3 | Libron は Amazon のページから最寄りの図書館の蔵書を検索できる便利なツールです。
4 | ブラウザにインストールしてAmazonにアクセスするだけで、すぐにご利用できます。
5 | » インストール方法はこちらをご覧ください。
6 |
7 |
8 |

9 |
10 |
11 |
12 |
拡張機能バーのLibronのアイコンをクリックします。
13 |

14 |
15 |
図書館設定画面が開くので「変更」リンクをクリックします。
16 |

17 |
18 |
最寄りの図書館を選択し「保存」ボタンをクリックします
19 |

20 |
21 |
本を検索します。
22 |

23 |
24 |
図書館にその本があれば図書館ページへのリンクが表示されます。
25 |

26 |
27 |
--------------------------------------------------------------------------------
/images/extension.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/champierre/libron/2ef5f59b7e8058dd5290c21d7057cb88f7f5bc9c/images/extension.png
--------------------------------------------------------------------------------