├── .github └── ISSUE_TEMPLATE │ └── user-story.md ├── FEATURES.md ├── LICENSE ├── README.md ├── app ├── helpers.js └── io.js ├── architecture-as-art.md ├── archive ├── FEATURES-2018-06-23.md ├── README-2018-06-02.md └── index-2019-03-17.html ├── assets └── SVGLoader.js ├── build ├── README.md ├── assets │ └── javascripts │ │ └── app.js ├── index.html └── textures │ └── crate.gif ├── connect-edit ├── README.md ├── index.html ├── load-stl │ ├── load-stl-nasa - Copy.html │ ├── load-stl-nasa.html │ ├── load-stl-r1.html │ ├── load-stl-r2.html │ ├── load-stl-r3.html │ ├── load-stl-r4 - Copy.html │ └── load-stl-r4.html ├── multiple-movable-objects │ └── multiple-movable-objects.html ├── r1 │ └── connect-edit.html └── r2 │ └── connect-edit.html ├── css2d ├── index.html ├── js │ ├── controls │ │ └── OrbitControls.js │ └── renderers │ │ └── CSS2DRenderer.js ├── textures │ └── planets │ │ ├── earth_atmos_2048.jpg │ │ ├── earth_atmos_4096.jpg │ │ ├── earth_clouds_1024.png │ │ ├── earth_clouds_2048.png │ │ ├── earth_lights_2048.png │ │ ├── earth_normal_2048.jpg │ │ ├── earth_specular_2048.jpg │ │ └── moon_1024.jpg └── three.js ├── data ├── building-analysis-software-tools.json ├── mindmap-3d-2.json ├── mindmap-3d-3.json ├── mindmap-3d-test.json └── mindmap-3d.json ├── graphql-3d ├── README.md ├── graphql-3d-r1.html ├── graphql-3d-r2.html ├── graphql-3d-r3-00.html ├── graphql-3d-r3-01.html ├── graphql-3d-r3.html ├── graphql-3d-r4.html ├── graphql-3d-r5.html └── index.html ├── index.css ├── index.html ├── mindmap-3d ├── README.md ├── index.html ├── mindmap-3d-1.html ├── r2 │ ├── mindmap-3d.html │ └── mindmap-3d.json ├── r3 │ ├── building-analysis-software-tools.json │ ├── mindmap-3d.html │ ├── mindmap-3d.json │ └── mindmap.css ├── r4 │ └── mindmap-3d.html └── r5 │ ├── mindmap3d-2018-06-10.html │ └── mindmap3d.html ├── sandbox ├── README.md ├── annotated-bibliography │ ├── README.md │ ├── annotated-bibliography-r1.html │ ├── annotated-bibliography-r2.html │ └── index.html ├── index.html ├── openstructures │ ├── 4x4xcm-square.html │ ├── README.md │ ├── index.html │ ├── r1 │ │ └── os-parts.html │ ├── r2 │ │ └── os-parts.html │ ├── r3 │ │ └── os-parts.html │ ├── r4 │ │ └── os-parts.html │ ├── r5 │ │ ├── openstructures-assembly-1.csv │ │ ├── openstructures-assembly-arbitrary.csv │ │ ├── openstructures-assembly-default.csv │ │ └── os-parts.html │ └── sprite.png └── opentecture-bookmarks │ ├── README.md │ ├── add-a-line-bookmarks-capture │ ├── README.md │ ├── archive │ │ ├── add-a-line-bookmarks-capture-2019-05-26.html │ │ ├── add-a-line-bookmarks-capture-2019-06-09.html │ │ └── bookmarks (1).json │ ├── index.html │ ├── r1 │ │ └── add-a-line-bookmarks.html │ ├── r2 │ │ └── add-a-line-bookmarks.html │ ├── readme.html │ ├── v-0-3-0 │ │ ├── add-a-line-bookmarks-capture.html │ │ ├── bookmarks (1).json │ │ └── bookmarks.json │ └── v-0-4-0 │ │ └── add-a-line-bookmarks-capture.html │ ├── add-a-line-bookmarks-scrape │ ├── README.md │ ├── index.html │ ├── readme.html │ └── v-0-0-0 │ │ ├── add-a-line-bookmarks-scrape.html │ │ ├── bookmarks.json │ │ ├── cor-core.js │ │ └── scr-scrape.js │ ├── add-a-line-bookmarks │ ├── README.md │ ├── archive │ │ ├── bookmarks.json │ │ ├── view-a-line-bookmarks-by-category │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ ├── r1 │ │ │ │ └── view-a-line-bookmarks.html │ │ │ ├── r2 │ │ │ │ └── view-a-line-bookmarks.html │ │ │ ├── r3 │ │ │ │ ├── style.css │ │ │ │ └── view-a-line-bookmarks.html │ │ │ ├── r4 │ │ │ │ ├── view-a-line-bookmarks-2019-02-16.html │ │ │ │ ├── view-a-line-bookmarks-2019-02-17.html │ │ │ │ ├── view-a-line-bookmarks-by-category-2019-03-02.html │ │ │ │ ├── view-a-line-bookmarks-by-category-2019-03-24.html │ │ │ │ ├── view-a-line-bookmarks-by-category-2019-03-30.html │ │ │ │ └── view-a-line-bookmarks-by-category.html │ │ │ └── readme.html │ │ ├── view-a-line-bookmarks-by-find │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ ├── latest.html │ │ │ ├── r1 │ │ │ │ └── view-a-line-bookmarks-by-find.html │ │ │ └── readme.html │ │ └── view-a-line-bookmarks-by-host │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ ├── r1 │ │ │ └── view-a-line-bookmarks-by-host.html │ │ │ └── readme.html │ ├── dev-notes.md │ ├── index.html │ ├── r-0-4 │ │ ├── README.md │ │ ├── add-a-line-bookmarks-0-4-0.html │ │ ├── archive │ │ │ ├── add-a-line-bookmarks-0-4-0-2019-04-20.html │ │ │ ├── add-a-line-bookmarks-0-4-0-2019-04-24.html │ │ │ ├── add-a-line-bookmarks-0-4-0-2019-04-27.html │ │ │ └── add-a-line-bookmarks-0-4-0-2019-05-11.html │ │ ├── ba-bookmark-add.js │ │ ├── blbf-bookmarks-list-by-find.js │ │ ├── bookmarks.json │ │ ├── cm-content-manage.js │ │ ├── com-comments-manage.js │ │ ├── fm-file-manage.js │ │ ├── markdown-help.md │ │ ├── mnu-menu.js │ │ ├── opentecture-bookmarks - Copy (2).json │ │ ├── opentecture-bookmarks - Copy.json │ │ ├── opentecture-bookmarks-2019-05-18.json │ │ ├── opentecture-bookmarks.json │ │ ├── style-2019-05-18.css │ │ └── style.css │ ├── r1 │ │ └── add-a-line-bookmarks.html │ ├── r2 │ │ ├── add-a-line-bookmarks.html │ │ ├── ba-bookmark-add.js │ │ ├── blbf-bookmarks-list-by-find.js │ │ ├── blbh-bookmarks-list-by-host.js │ │ ├── blbs-bookmarks-list-by-source.js │ │ ├── cm-contents-manage.js │ │ ├── fm-file-manage.js │ │ ├── mnu-menu.js │ │ ├── opentecture-bookmarks-2.json │ │ └── opentecture-bookmarks.json │ ├── r3 │ │ ├── add-a-line-bookmarks.html │ │ ├── ba-bookmark-add.js │ │ └── mnu-menu.js │ ├── readme.html │ ├── v-0-5-0 │ │ ├── README.md │ │ ├── add-a-line-bookmarks.html │ │ ├── archive │ │ │ ├── add-a-line-bookmarks-0-5-0.html │ │ │ ├── add-a-line-bookmarks-2019-06-03.html │ │ │ ├── add-a-line-bookmarks-2019-06-03a.html │ │ │ ├── blbf-bookmarks-list-by-find-2019-06-01.js │ │ │ ├── blbf-bookmarks-list-by-find.-2019-06-08js │ │ │ ├── bookmarks (1).json │ │ │ ├── bookmarks - Copy.json │ │ │ ├── bookmarks-2019-06-02.json │ │ │ ├── bookmarks-2019-06-10.json │ │ │ ├── fob-file-open-basic-2019-06-01.js │ │ │ ├── fob-file-open-basic.js │ │ │ └── style.css │ │ ├── bookmarks.json │ │ ├── js │ │ │ ├── bdm-bookmarks-by-domain.js │ │ │ ├── bm-bookmarks.js │ │ │ ├── bme-bookmarks-edit.js │ │ │ ├── bmn-bookmarks-new.js │ │ │ ├── btg-bookmarks-by-tag.js │ │ │ ├── com-comments.js │ │ │ ├── tag-tags.js │ │ │ └── tga-tags-add.js │ │ └── readme.html │ ├── v-0-5-01 │ │ ├── README.md │ │ ├── add-a-line-bookmarks-2019-06-23.html │ │ ├── add-a-line-bookmarks.html │ │ ├── archive │ │ │ ├── add-a-line-bookmarks-0-5-0.html │ │ │ ├── add-a-line-bookmarks-2019-06-03.html │ │ │ ├── add-a-line-bookmarks-2019-06-03a.html │ │ │ ├── blbf-bookmarks-list-by-find-2019-06-01.js │ │ │ ├── blbf-bookmarks-list-by-find.-2019-06-08js │ │ │ ├── bookmarks (1).json │ │ │ ├── bookmarks - Copy.json │ │ │ ├── bookmarks-2019-06-02.json │ │ │ ├── bookmarks-2019-06-10.json │ │ │ ├── fob-file-open-basic-2019-06-01.js │ │ │ ├── fob-file-open-basic.js │ │ │ └── style.css │ │ ├── bookmarks.json │ │ ├── js │ │ │ ├── bdm-bookmarks-by-domain.js │ │ │ ├── bm-bookmarks.js │ │ │ ├── bme-bookmarks-edit.js │ │ │ ├── bmn-bookmarks-new.js │ │ │ ├── btg-bookmarks-by-tag.js │ │ │ ├── com-comments.js │ │ │ ├── cor-core.js │ │ │ ├── tag-tags.js │ │ │ └── tga-tags-add.js │ │ ├── popup.md │ │ └── readme.html │ ├── v-0-5-02 │ │ ├── README.md │ │ ├── add-a-line-bookmarks.html │ │ ├── bookmarks.json │ │ ├── js │ │ │ ├── bdm-bookmarks-by-domain.js │ │ │ ├── bm-bookmarks.js │ │ │ ├── bme-bookmarks-edit.js │ │ │ ├── bmn-bookmarks-new.js │ │ │ ├── btg-bookmarks-by-tag.js │ │ │ ├── com-comments-2019-07-07.js │ │ │ ├── com-comments.js │ │ │ ├── cor-core.js │ │ │ ├── met-meta.js │ │ │ ├── tag-tags.js │ │ │ └── tga-tags-add.js │ │ ├── popup.md │ │ └── readme.html │ ├── v-0-5-03 │ │ ├── README.md │ │ ├── add-a-line-bookmarks.html │ │ ├── bookmarks.json │ │ ├── js │ │ │ ├── bdm-bookmarks-by-domain.js │ │ │ ├── bm-bookmarks.js │ │ │ ├── bme-bookmarks-edit.js │ │ │ ├── bmn-bookmarks-new.js │ │ │ ├── btg-bookmarks-by-tag.js │ │ │ ├── com-comments.js │ │ │ ├── cor-core.js │ │ │ ├── met-meta.js │ │ │ ├── mfo-menu-file-order.js │ │ │ ├── mjl-menu-json-lines.js │ │ │ ├── tag-tags.js │ │ │ └── tga-tags-add.js │ │ ├── popup.md │ │ └── readme.html │ ├── v-0-5-04 │ │ ├── README.md │ │ ├── add-a-line-bookmarks.html │ │ ├── bookmarks.json │ │ ├── js-menu │ │ │ ├── mbd-menu-bookmarks-domain.js │ │ │ ├── mbt-menu-bookmarks-tag.js │ │ │ ├── mfo-menu-file-order.js │ │ │ └── mjl-menu-json-lines.js │ │ ├── js │ │ │ ├── bed-bookmark-edit-dialog.js │ │ │ ├── bm-bookmarks.js │ │ │ ├── bop-bookmarks-onload-parse.js │ │ │ └── cor-core.js │ │ └── popup.md │ ├── v-0-5-05 │ │ ├── README.md │ │ ├── add-a-line-bookmarks.html │ │ ├── bookmarks.json │ │ ├── js-menu │ │ │ ├── mbd-menu-bookmarks-domain.js │ │ │ ├── mbt-menu-bookmarks-tag.js │ │ │ ├── mdu-menu-duplicates.js │ │ │ ├── mfo-menu-file-order.js │ │ │ ├── mjl-menu-json-lines.js │ │ │ └── mse.menu-search.js │ │ ├── js │ │ │ ├── bed-bookmark-edit-dialog.js │ │ │ ├── bme-bookmarks-edit.js │ │ │ ├── bmn-bookmarks-new.js │ │ │ ├── bop-bookmarks-onload-parse.js │ │ │ ├── com-comments.js │ │ │ ├── cor-core.js │ │ │ ├── tag-tags.js │ │ │ ├── tga-tags-add.js │ │ │ └── xxx-bm-bookmarks.js │ │ └── popup.md │ ├── v-0-5-06 │ │ ├── README.md │ │ ├── add-a-line-bookmarks.html │ │ ├── bop-bookmark-onload-parse │ │ │ └── v-0-00 │ │ │ │ ├── bop-bookmark-onload-parse.html │ │ │ │ ├── bop-bookmark-onload-parse.js │ │ │ │ └── bop-bookmark-onload-parse.md │ │ ├── foj-file-open-json │ │ │ └── v-0-00 │ │ │ │ ├── foj-file-open-json.html │ │ │ │ ├── foj-file-open-json.js │ │ │ │ └── foj-file-open-json.md │ │ ├── js-lint │ │ │ ├── mdu-menu-duplicates.js │ │ │ └── tts-tidy-tag-sets.js │ │ ├── js-menu │ │ │ ├── mbd-menu-bookmarks-domain.js │ │ │ ├── mbt-menu-bookmarks-tag.js │ │ │ ├── mfo-menu-file-order.js │ │ │ ├── mjl-menu-json-lines.js │ │ │ ├── mse.menu-search-2019-10-05.js │ │ │ └── mse.menu-search.js │ │ └── js │ │ │ ├── bed-bookmark-edit-dialog.js │ │ │ ├── bme-bookmarks-edit.js │ │ │ ├── bmn-bookmarks-new.js │ │ │ ├── com-comments.js │ │ │ ├── tag-tags.js │ │ │ ├── tga-tags-add.js │ │ │ ├── xxx-bm-bookmarks.js │ │ │ ├── xxx-bop-bookmarks-onload-parse.js │ │ │ └── xxx-cor-core.js │ └── v-0-5-07 │ │ ├── README.md │ │ ├── add-a-line-bookmarks.html │ │ ├── bop-bookmark-onload-parse │ │ └── v-0-00 │ │ │ ├── bop-bookmark-onload-parse.html │ │ │ ├── bop-bookmark-onload-parse.js │ │ │ └── bop-bookmark-onload-parse.md │ │ ├── foj-file-open-json │ │ └── v-0-00 │ │ │ ├── foj-file-open-json.html │ │ │ ├── foj-file-open-json.js │ │ │ └── foj-file-open-json.md │ │ ├── js-lint │ │ ├── mdu-menu-duplicates.js │ │ └── tts-tidy-tag-sets.js │ │ ├── js-menu │ │ ├── mbd-menu-bookmarks-domain.js │ │ ├── mbt-menu-bookmarks-tag.js │ │ ├── mfo-menu-file-order.js │ │ ├── mjl-menu-json-lines.js │ │ ├── mse.menu-search-2019-10-05.js │ │ └── mse.menu-search.js │ │ └── js │ │ ├── bed-bookmark-edit-dialog.js │ │ ├── bme-bookmarks-edit.js │ │ ├── bmn-bookmarks-new.js │ │ ├── com-comments.js │ │ ├── tag-tags.js │ │ ├── tga-tags-add.js │ │ ├── xxx-bm-bookmarks.js │ │ ├── xxx-bop-bookmarks-onload-parse.js │ │ └── xxx-cor-core.js │ ├── archive │ ├── README-2019-03-31.md │ ├── add-a-line-bookmarks-view │ │ └── v-0-0-0 │ │ │ ├── add-a-line-bookmarks-view.html │ │ │ ├── bookmarks.json │ │ │ ├── cor-core.js │ │ │ ├── js │ │ │ ├── bbf-bookmarks-by-filter.js │ │ │ └── bm-bookmarks.js │ │ │ └── popup.md │ ├── bookmarks-2019-06-22.json │ ├── bookmarks-2019-06-23.json │ ├── bookmarks-2019-07-06.json │ ├── bookmarks-2019-07-27.json │ └── zzz-opentecture-bookmarks.json │ ├── bookmarks-2019-08-11.json │ ├── bookmarks-2019-08-24.json │ ├── bookmarks-2019-09-29.json │ ├── bookmarks-2019-10-05.json │ ├── bookmarks.json │ ├── index.html │ └── utilities │ ├── convert-bookmark-dates to-utc │ ├── convert-bookmark-dates-to-utc..html │ ├── opentecture-bookmarks-updated.json │ └── opentecture-bookmarks.json │ ├── html-frame-test.html │ └── tags-manage │ └── tags-manage.html ├── svg ├── bear.svg ├── boar.svg ├── buzzard.svg ├── donkey.svg ├── fox.svg ├── goat.svg ├── hare.svg ├── moose.svg ├── noun_512565_cc.svg ├── rooster.svg ├── svg-to-shape-2.html ├── svg-to-shape-3.html └── wolf.svg └── templates ├── README-template.md ├── README.md ├── index.html ├── latest.html ├── readme-template.html ├── readme.html └── threejs-basic.html /.github/ISSUE_TEMPLATE/user-story.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: User Story 3 | about: Describe this issue template's purpose here. 4 | 5 | --- 6 | 7 | ### Story 8 | 9 | As a [PERSONA](PERSONAS.md) 10 | I want to 11 | So I can 12 | 13 | ### Acceptance Criteria 14 | 15 | Given 16 | When 17 | Then 18 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Opentecture 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /app/helpers.js: -------------------------------------------------------------------------------- 1 | function animate() { 2 | requestAnimationFrame(animate); 3 | //renderer.render(scene, camera); 4 | controls.update(); 5 | effect.render(scene, camera); 6 | } 7 | 8 | function onWindowResize() { 9 | camera.aspect = window.innerWidth / window.innerHeight; 10 | camera.updateProjectionMatrix(); 11 | renderer.setSize( window.innerWidth, window.innerHeight ); 12 | //console.log( 'onWindowResize window.innerWidth', window.innerWidth ); 13 | } 14 | 15 | function requestFile(url) { 16 | const xhr = new XMLHttpRequest(); 17 | xhr.crossOrigin = 'anonymous'; 18 | xhr.open('GET', url, true); 19 | xhr.onerror = function(xhr) { 20 | console.log('error:', xhr); 21 | }; 22 | xhr.onprogress = function(xhr) { 23 | //console.log('bytes loaded:', xhr.loaded); 24 | }; 25 | xhr.onload = callback; 26 | xhr.send(null); 27 | 28 | function callback(xhr) { 29 | const response = xhr.target.response; 30 | //console.log( 'response', response ); 31 | //divContents.innerHTML = response; 32 | 33 | const newJson = JSON.parse(response); 34 | //console.log('json', json); 35 | 36 | //json.cad = newJson.cad; 37 | 38 | if ( newJson.cad ) { 39 | //json.cad = newJson.cad; 40 | //json.energyAnalysis = newJson.energyAnalysis; 41 | getVoxel( newJson, 'cad'); 42 | } 43 | 44 | if ( newJson.energyAnalysis ) { 45 | //json.cad = newJson.cad; 46 | //json.energyAnalysis = newJson.energyAnalysis; 47 | getVoxel( newJson, 'energyAnalysis' ); 48 | } 49 | 50 | if (newJson.fileFormat) { 51 | getFileFormats( newJson ); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/io.js: -------------------------------------------------------------------------------- 1 | function openFile(files) { 2 | const reader = new FileReader(); 3 | reader.onload = function(event) { 4 | 5 | json = JSON.parse(reader.result); 6 | console.log('json', json); 7 | 8 | getVoxel(json); 9 | 10 | divLog.innerHTML = 11 | 'name: ' + files.files[0].name + '
' + 12 | 'size: ' + files.files[0].size.toLocaleString() + ' bytes
' + 13 | 'type: ' + files.files[0].type + '
' + 14 | 'modified: ' + files.files[0].lastModifiedDate.toLocaleDateString() + 15 | ''; 16 | 17 | console.log('', files); 18 | 19 | } 20 | 21 | reader.readAsText(files.files[0]); 22 | } 23 | 24 | function saveFile() { 25 | js = JSON.stringify(json, null, ' '); 26 | // console.log('js', js); 27 | var blob = new Blob([js]); 28 | var a = document.body.appendChild(document.createElement('a')); 29 | a.href = window.URL.createObjectURL(blob); 30 | a.download = 'mindmap-3d.json'; 31 | a.click(); 32 | // delete a; 33 | a = null; 34 | } 35 | -------------------------------------------------------------------------------- /archive/README-2018-06-02.md: -------------------------------------------------------------------------------- 1 | # Mindmapping 2 | 3 | A web-based 3d Mindmap. 4 | 5 | Theo says: here we a-go-go! 6 | 7 | opentecture.github.io/mindmapping/index.html -------------------------------------------------------------------------------- /build/README.md: -------------------------------------------------------------------------------- 1 | # Try Mindmapping 2 | 3 | [Link to the Demo](https://opentecture.github.io/mindmapping/build/index.html) 4 | 5 | # Features 6 | 7 | * Create one or more Nodes (currently designed as Planes that look like Yellow Stickies) 8 | * Create Nodes of 2 different Styles (Plane or Cargo Box) 9 | * See Editable Node attributes on Mouse Hover 10 | * Move each Node with its Transform Controls 11 | * Zoom in and out using Orbit Controls 12 | * Set Top Down, Front, Side, or Isomorphic Views 13 | * Toggle the 360 Rotation of the full scene 14 | * Reset a Scene 15 | * Load Nodes from a `nodes` .json file 16 | * List .stl files from GitHub 17 | * Load listed .stl files from GitHub 18 | 19 | ## Currently: in Demo-mode only 20 | 21 | * Draw lines between objects 22 | * Draw lines with arrows between objects 23 | 24 | # Roadmap 25 | 26 | See this repo's [Issues](../../../issues). 27 | -------------------------------------------------------------------------------- /build/textures/crate.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opentecture/mindmapping/a0204a90cec8eb3795db511c59d1d7e74e6d9d3f/build/textures/crate.gif -------------------------------------------------------------------------------- /connect-edit/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /css2d/textures/planets/earth_atmos_2048.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opentecture/mindmapping/a0204a90cec8eb3795db511c59d1d7e74e6d9d3f/css2d/textures/planets/earth_atmos_2048.jpg -------------------------------------------------------------------------------- /css2d/textures/planets/earth_atmos_4096.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opentecture/mindmapping/a0204a90cec8eb3795db511c59d1d7e74e6d9d3f/css2d/textures/planets/earth_atmos_4096.jpg -------------------------------------------------------------------------------- /css2d/textures/planets/earth_clouds_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opentecture/mindmapping/a0204a90cec8eb3795db511c59d1d7e74e6d9d3f/css2d/textures/planets/earth_clouds_1024.png -------------------------------------------------------------------------------- /css2d/textures/planets/earth_clouds_2048.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opentecture/mindmapping/a0204a90cec8eb3795db511c59d1d7e74e6d9d3f/css2d/textures/planets/earth_clouds_2048.png -------------------------------------------------------------------------------- /css2d/textures/planets/earth_lights_2048.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opentecture/mindmapping/a0204a90cec8eb3795db511c59d1d7e74e6d9d3f/css2d/textures/planets/earth_lights_2048.png -------------------------------------------------------------------------------- /css2d/textures/planets/earth_normal_2048.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opentecture/mindmapping/a0204a90cec8eb3795db511c59d1d7e74e6d9d3f/css2d/textures/planets/earth_normal_2048.jpg -------------------------------------------------------------------------------- /css2d/textures/planets/earth_specular_2048.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opentecture/mindmapping/a0204a90cec8eb3795db511c59d1d7e74e6d9d3f/css2d/textures/planets/earth_specular_2048.jpg -------------------------------------------------------------------------------- /css2d/textures/planets/moon_1024.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opentecture/mindmapping/a0204a90cec8eb3795db511c59d1d7e74e6d9d3f/css2d/textures/planets/moon_1024.jpg -------------------------------------------------------------------------------- /data/building-analysis-software-tools.json: -------------------------------------------------------------------------------- 1 | { "energyAnalysis": [ 2 | { 3 | "name": "Arup", 4 | "product": "EnergySave" 5 | }, 6 | { 7 | "name": "ASHRAE", 8 | "product": "Building EQ" }, 9 | { 10 | "name": "Autodesk", 11 | "product": "Green Building Studio (GBS)" }, 12 | { 13 | "name": "Bentley", 14 | "product": "Bentley-AECOsim" }, 15 | { 16 | "name": "Bentley", 17 | "product": "Bentley-Hevacomp" }, 18 | { 19 | "name": "Bionova Ltd.", 20 | "product": "One Click LCA" }, 21 | { 22 | "name": "blueCape", 23 | "product": "BlueCFD-AIR" }, 24 | { 25 | "name": "CADLine", 26 | "product": "Cymap" }, 27 | { 28 | "name": "Carrier", 29 | "product": "HAP (Hourly Analysis Program)" }, 30 | { 31 | "name": "CYPE", 32 | "product": "CYPETHERM Loads, HVAC, EPlus, and CYPELUX" }, 33 | { 34 | "name": "DesignBuilder", 35 | "product": "DesignBuilder v2" }, 36 | { 37 | "name": "vDIALux", 38 | "product": "DIALux 4.9" }, 39 | { 40 | "name": "Digital Alchemy", 41 | "product": "Simergy" }, 42 | { 43 | "name": "E4 Tech", 44 | "product": "Lesosai" }, 45 | { 46 | "name": "Elite Software", 47 | "product": "Chvac - Commercial HVAC Load Calculations" }, 48 | { 49 | "name": "EnergySoft, LLC", 50 | "product": "EnergyPro" }, 51 | { 52 | "name": "Environmental Design Solutions Limited", 53 | "product": "Tas" }, 54 | { 55 | "name": "greenspace Live", 56 | "product": "greenspace Live Energy Design and Analysis Tools" }, 57 | { 58 | "name": "HVAC Solution", 59 | "product": "HVAC Solution" }, 60 | { 61 | "name": "IES Limited", 62 | "product": "Virtual Environment (VE)" }, 63 | { 64 | "name": "IZUBA énergies", 65 | "product": "Pleiades" }, 66 | { 67 | "name": "Ladybug Tools", 68 | "product": "Ladybug Tools gbXML ViewerViewerNot Yet" }, 69 | { 70 | "name": "mh-software GmbH", 71 | "product": "RaumGEO" }, 72 | { 73 | "name": "National Renewable Energy Laboratory", 74 | "product": "Open StudioAnalysisLevel 2 Certification" }, 75 | { 76 | "name": "National University of Ireland, Cork", 77 | "product": "Cylon Controls Ltd. & Ace Controls ltd." }, 78 | { 79 | "name": "Relux Informatik AG", 80 | "product": "ReluxSuite" }, 81 | { 82 | "name": "Sankom Sp. z o.o.", 83 | "product": "Auditor OZC 6.9 Pro" }, 84 | { 85 | "name": "Software fur Haustechniker", 86 | "product": "Win_Ht" }, 87 | { 88 | "name": "Solar-Computer", 89 | "product": "Green-Building-Information-System (GBIS)" }, 90 | { 91 | "name": "Trane", 92 | "product": "Trace 700" } 93 | ] 94 | 95 | } -------------------------------------------------------------------------------- /graphql-3d/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /index.css: -------------------------------------------------------------------------------- 1 | /* Copyright 2019 pushMe-pullYou authors. MIT License */ 2 | 3 | /* https://www.w3schools.com/colors/colors_names.asp // use colors and borders to help identify the scope of particular elements */ 4 | 5 | html { 6 | --mnu-color: MediumSlateBlue; 7 | --mnu-back-color: ivory; 8 | --mnu-width: 300px; 9 | height: 100%; 10 | } 11 | 12 | body, 13 | html { 14 | font: 12pt monospace; 15 | height: 100%; 16 | margin: 0; 17 | } 18 | 19 | a { 20 | color: var( --mnu-color); 21 | text-decoration: none; 22 | } 23 | 24 | a:hover, 25 | a:focus, 26 | #hamburger:hover { 27 | background-color: yellow; 28 | color: #8888; 29 | } 30 | 31 | blockquote, 32 | pre { 33 | background-color: #eee; 34 | padding: 10px; 35 | } 36 | 37 | button, 38 | input[ type=button] { 39 | background-color: #ddd; 40 | border: none; 41 | color: var( --mnu-color); 42 | cursor: pointer; 43 | padding: 3px 20px; 44 | } 45 | 46 | button:hover { 47 | background-color: #ccc; 48 | color: #fff 49 | } 50 | 51 | iframe { 52 | width: 100%; 53 | } 54 | 55 | input[ type=range] { 56 | -webkit-appearance: none; 57 | -moz-appearance: none; 58 | background-color: #ddd; 59 | width: 100%; 60 | } 61 | 62 | input[ type=range]::-moz-range-thumb { 63 | background-color: #888; 64 | border-radius: 0; 65 | width: 10px; 66 | } 67 | 68 | input[ type=range]::-webkit-slider-thumb { 69 | -webkit-appearance: none; 70 | background-color: #888; 71 | height: 20px; 72 | width: 10px; 73 | } 74 | 75 | td { 76 | vertical-align: top; 77 | } 78 | 79 | #divContainer { 80 | height: 100%; 81 | margin: 0 0 0 var( --mnu-width); 82 | transition: margin-left .5s; 83 | position: relative; 84 | } 85 | 86 | #divContents { 87 | height: 100%; 88 | left: 0; 89 | margin: 0 auto; 90 | right: 0; 91 | } 92 | 93 | #divMenu { 94 | background-color: var( --mnu-back-color); 95 | box-sizing: border-box; 96 | margin: 0; 97 | height: 100%; 98 | overflow-x: hidden; 99 | padding: 30px 10px 0 10px; 100 | position: fixed; 101 | top: 0; 102 | width: var( --mnu-width); 103 | z-index: 1; 104 | transition: 0.5s; 105 | } 106 | 107 | #hamburger { 108 | background-color: pink; 109 | box-sizing: border-box; 110 | cursor: pointer; 111 | font-size: 30px; 112 | left: calc( var( --mnu-width) - 100px); 113 | line-height: 30px; 114 | margin: 0; 115 | padding: 5px 15px 8px 10px; 116 | position: fixed; 117 | top: 0; 118 | transition: left .5s; 119 | z-index: 10; 120 | } 121 | -------------------------------------------------------------------------------- /mindmap-3d/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /mindmap-3d/r2/mindmap-3d.json: -------------------------------------------------------------------------------- 1 | [ 2 | { "vendor": "Artifice", "product": "Design Workshop", "position": [ -475, 25, -425 ] }, 3 | { "vendor": "Autodesk", "product": "AutoCAD Architecture", "position": [ -375, 25, -325 ] }, 4 | { "vendor": "Autodesk", "product": "AutoCAD MEP", "position": [ -275, 25, -325 ] }, 5 | { "vendor": "Autodesk", "product": "AutoCAD Revit Architecture & Autodesk Revit MEP", "position": [ -175, 25, -325 ] }, 6 | { "vendor": "Bentley", "product": "Bentley AECOsim Building Designer", "position": [ -75, 25, -425 ] }, 7 | { "vendor": "Bentley", "product": "Bentley Architecture", "position": [ 25, 25, -425 ] }, 8 | { "vendor": "Bentley", "product": "Bentley Building Mechanical Systems", "position": [ 125, 25, -425 ] }, 9 | { "vendor": "Bentley", "product": "Bentley Speedikon Architectural", "position": [ 225, 25, -425 ] }, 10 | { "vendor": "Cadsoft", "product": "Envisioneer", "position": [ -125, 25, -225 ] }, 11 | { "vendor": "Data Design System", "product": "DDS-CAD", "position": [ -25, 25, -225 ] }, 12 | { "vendor": "Digital Alchemy", "product": "Simergy / Building Model Creator", "position": [ 75, 25, -225 ] }, 13 | { "vendor": "Graphisoft", "product": "ArchiCAD", "position": [ 175, 25, -225 ] }, 14 | { "vendor": "Nemetschek Vectorworks", "product": "Vectorworks Architect 2013", "position": [ 275, 25, -225 ] }, 15 | { "vendor": "Onuma", "product": " Onuma BIMStorm", "position": [ 375, 25, -225 ] }, 16 | { "vendor": "Rhinoceros 3D", "product": "Rhino 3D and Grasshopper", "position": [ 425, 25, -375 ] }, 17 | { "vendor": "Trimble", "product": "SketchUp", "position": [ 325, 25, -375 ] } 18 | ] -------------------------------------------------------------------------------- /mindmap-3d/r3/building-analysis-software-tools.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "vendor": "Arup", 4 | "product": "EnergySave" 5 | }, 6 | { 7 | "vendor": "ASHRAE", 8 | "product": "Building EQ" }, 9 | { 10 | "vendor": "Autodesk", 11 | "product": "Green Building Studio (GBS)" }, 12 | { 13 | "vendor": "Bentley", 14 | "product": "Bentley-AECOsim" }, 15 | { 16 | "vendor": "Bentley", 17 | "product": "Bentley-Hevacomp" }, 18 | { 19 | "vendor": "Bionova Ltd.", 20 | "product": "One Click LCA" }, 21 | { 22 | "vendor": "blueCape", 23 | "product": "BlueCFD-AIR" }, 24 | { 25 | "vendor": "CADLine", 26 | "product": "Cymap" }, 27 | { 28 | "vendor": "Carrier", 29 | "product": "HAP (Hourly Analysis Program)" }, 30 | { 31 | "vendor": "CYPE", 32 | "product": "CYPETHERM Loads, HVAC, EPlus, and CYPELUX" }, 33 | { 34 | "vendor": "DesignBuilder", 35 | "product": "DesignBuilder v2" }, 36 | { 37 | "vendor": "vDIALux", 38 | "product": "DIALux 4.9" }, 39 | { 40 | "vendor": "Digital Alchemy", 41 | "product": "Simergy" }, 42 | { 43 | "vendor": "E4 Tech", 44 | "product": "Lesosai" }, 45 | { 46 | "vendor": "Elite Software", 47 | "product": "Chvac - Commercial HVAC Load Calculations" }, 48 | { 49 | "vendor": "EnergySoft, LLC", 50 | "product": "EnergyPro" }, 51 | { 52 | "vendor": "Environmental Design Solutions Limited", 53 | "product": "Tas" }, 54 | { 55 | "vendor": "greenspace Live", 56 | "product": "greenspace Live Energy Design and Analysis Tools" }, 57 | { 58 | "vendor": "HVAC Solution", 59 | "product": "HVAC Solution" }, 60 | { 61 | "vendor": "IES Limited", 62 | "product": "Virtual Environment (VE)" }, 63 | { 64 | "vendor": "IZUBA énergies", 65 | "product": "Pleiades" }, 66 | { 67 | "vendor": "Ladybug Tools", 68 | "product": "Ladybug Tools gbXML ViewerViewerNot Yet" }, 69 | { 70 | "vendor": "mh-software GmbH", 71 | "product": "RaumGEO" }, 72 | { 73 | "vendor": "National Renewable Energy Laboratory", 74 | "product": "Open StudioAnalysisLevel 2 Certification" }, 75 | { 76 | "vendor": "National University of Ireland, Cork", 77 | "product": "Cylon Controls Ltd. & Ace Controls ltd." }, 78 | { 79 | "vendor": "Relux Informatik AG", 80 | "product": "ReluxSuite" }, 81 | { 82 | "vendor": "Sankom Sp. z o.o.", 83 | "product": "Auditor OZC 6.9 Pro" }, 84 | { 85 | "vendor": "Software fur Haustechniker", 86 | "product": "Win_Ht" }, 87 | { 88 | "vendor": "Solar-Computer", 89 | "product": "Green-Building-Information-System (GBIS)" }, 90 | { 91 | "vendor": "Trane", 92 | "product": "Trace 700" } 93 | ] -------------------------------------------------------------------------------- /mindmap-3d/r3/mindmap.css: -------------------------------------------------------------------------------- 1 | body { 2 | font: 11pt monospace; 3 | margin: 0; 4 | overflow: hidden; 5 | } 6 | 7 | a { 8 | color: crimson; 9 | text-decoration: none; 10 | } 11 | 12 | a:hover, 13 | a:focus { 14 | background-color: yellow; 15 | color: #aaa; 16 | text-decoration: underline 17 | } 18 | 19 | button { 20 | background-color: #ddd; 21 | border: none; 22 | color: #322; 23 | cursor: pointer; 24 | padding: 3px 5px; 25 | } 26 | 27 | button:hover { 28 | background: #ccc; 29 | color: #fff 30 | } 31 | 32 | #divMenu { 33 | margin: 0 20px; 34 | max-width: 20rem; 35 | position: absolute; 36 | } 37 | -------------------------------------------------------------------------------- /sandbox/README.md: -------------------------------------------------------------------------------- 1 | 2 | [You are now in a GitHub source code view - click this link to view Read Me file as a web page]( https://opentecture.github.io/mindmapping/index.html#sandbox/README.md "View file as a web page." ) 3 | 4 |
6 | 7 |
8 | 9 | # [Sandbox Read Me]( #sandbox/README.md ) 10 | 11 | 17 | 18 | 19 | ## Concept 20 | 21 | * Various experiments available via left menu 22 | 23 | 24 | ## To Do / Wish List 25 | 26 | 27 | ## Issues 28 | 29 | 30 | 31 | ## Links of Interest 32 | 33 | 34 | ## Change Log 35 | 36 | ### 2019-02-11 ~ Theo 37 | 38 | * First commit 39 | 40 | 41 | *** 42 | 43 | #
44 | -------------------------------------------------------------------------------- /sandbox/annotated-bibliography/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /sandbox/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /sandbox/openstructures/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /sandbox/openstructures/r5/openstructures-assembly-1.csv: -------------------------------------------------------------------------------- 1 | getBase,0,0,0 2 | getFrameZ,-120,60,0 3 | getFrameB,-60,60,60 4 | getFrameV,60,60,120 5 | getFrameA,120,0,0 6 | getFrameB,120,-120,0 7 | getFrameP,0,-120,0 8 | getFrameL,-60,-240,0 9 | getFrameP,-180,-240,0 10 | getFrameA,-240,-120,0 11 | getFrameZ,-240,-120,120 12 | getFrameT,-240,60,120 13 | getFrameP,-240,120,0 -------------------------------------------------------------------------------- /sandbox/openstructures/r5/openstructures-assembly-arbitrary.csv: -------------------------------------------------------------------------------- 1 | getBase,0,0,0 2 | getFrameZ,-120,60,10,10,90 3 | getFrameB,-60,60,60,20,80 4 | getFrameV,60,60,120,30,70 5 | getFrameA,120,0,0,40,60 6 | getFrameB,120,-120,50,50 7 | getFrameP,0,-120,0,60,40 8 | getFrameL,-60,-240,0,70,30 9 | getFrameP,-180,-240,0,80,20 10 | getFrameA,-240,-120,0,90,10 11 | getFrameZ,-240,-120,120,100,0 12 | getFrameT,-240,60,120,110,-10 13 | getFrameP,-240,120,0,120,-20 -------------------------------------------------------------------------------- /sandbox/openstructures/r5/openstructures-assembly-default.csv: -------------------------------------------------------------------------------- 1 | getBase,0,0,0 2 | getFrame,-60,-60,120 3 | getFrameV,120,120,0 4 | getFrameL,-240,0,0,0 5 | getFrameT,-60,60,0,0 6 | getFrameZ,-240,-240,0 7 | getFrameA,-60,-240,0 8 | getFrameB,120,-60,0 9 | getFrameP,120,-240,0 -------------------------------------------------------------------------------- /sandbox/openstructures/sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opentecture/mindmapping/a0204a90cec8eb3795db511c59d1d7e74e6d9d3f/sandbox/openstructures/sprite.png -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks-capture/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks-capture/readme.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Open Index or Markdown 6 | 7 | 8 | 9 | 10 | 18 | 19 | 20 | 21 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks-scrape/README.md: -------------------------------------------------------------------------------- 1 | 2 | [You are now in a GitHub source code view - click this link to view Read Me file as a web page]( https://opentecture.github.io/#mindmapping/sandbox/opentecture-bookmarks/add-a-line-bookmarks-scrape/README.md "View file as a web page." ) 3 | 4 |
6 | 7 |
8 | 9 | # [Add-a-line Bookmarks Scrape Read Me]( #sandbox/opentecture-bookmarks/add-a-line-bookmarks-scrape/README.md ) 10 | 11 | 17 | 18 | 19 | ## Concept 20 | 21 | * Add descriptions and favicons to bookmarks by scraping the data made available from the source URL 22 | 23 | ## To Do / Wish List 24 | 25 | * 2019-06-23 ~ Theo ~ Add pause/play toggle button 26 | * 2019-06-23 ~ Theo ~ Add start and finish frame settings 27 | * 2019-06-23 ~ Theo ~ Add enter any URL 28 | * 2019-06-23 ~ Theo ~ Capture a checksum for the file or file length 29 | 30 | ## Issues 31 | 32 | 33 | 34 | ## Links of Interest 35 | 36 | 37 | ## Change Log 38 | 39 | ### 2019-06-23 ~ Theo 40 | 41 | SCR 42 | C - update readme and menu messages 43 | B - ABS: Set read me as default file 44 | F - SCR: Add file onload event listener 45 | F - SCR: Add capture file length 46 | 47 | 48 | ### 2019-06-10 ~ Theo 49 | 50 | ABS v0.0.0 51 | 52 | * First commit 53 | 54 | 55 | *** 56 | 57 | #
58 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks-scrape/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks-scrape/readme.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks-scrape/v-0-0-0/cor-core.js: -------------------------------------------------------------------------------- 1 | /* globals FOB */ 2 | /* jshint esversion: 6 */ 3 | /* jshint loopfunc: true */ 4 | 5 | 6 | const COR = { 7 | "copyright": "Copyright 2019 Opentecture authors. MIT License", 8 | "date": "2019-06-23", 9 | "description": "core - Contains local overrides", 10 | "helpFile": "cor-core/README.md", 11 | "version": "0.0.0-1cor", 12 | }; 13 | 14 | 15 | 16 | THM.themeUrlStorage = 'addALineTheme'; // set for each instance in HTML file 17 | THM.cssBasic = "https://pushme-pullyou.github.io/tootoo14/js-14-03/style.css"; 18 | THM.backgroundColor = "#ded"; 19 | 20 | //FOB.urlDefaultFile = "../../bookmarks.json"; 21 | FOB.urlDefaultFile = "../README.md"; 22 | 23 | // For main menu header 24 | MNU.helpFile = "../../README.md"; 25 | 26 | MNU.description = `Very simple JavaScript files to help you explore and build new tools on GitHub.`; 27 | 28 | MNU.urlSourceCode = "https://github.com/opentecture/mindmapping/tree/master/sandbox/opentecture-bookmarks"; 29 | 30 | MNU.homeText = "opentecture"; 31 | MNU.homeTitle = "Building to a common, scalable standard creates new opportunities to design and create objects and spaces in a collaborative way."; 32 | MNU.homeUrl = "https://www.opentecture.com/"; 33 | 34 | MNU.repoText = "mindmapping"; 35 | MNU.repoTitle = "Mindmapping is a collection of basic plain-vanilla JavaScript scripts for idea management using GitHub pages, 3D and whatever else comes to mind"; 36 | MNU.repoUrl = "https://opentecture.github.io/mindmapping"; 37 | 38 | MNU.appText = "Bookmarks"; 39 | MNU.appTitle = ""; //"Basic html content management script with sliding menu, css theme selection, Markdown to HTML, drag and drop file reading capability, access to frequently used pages and more"; 40 | MNU.appUrl = "https://opentecture.github.io/mindmapping/#sandbox/opentecture-bookmarks/README.md"; 41 | 42 | MNU.footerPopupUrl = "https://pushme-pullyou.github.io/tootoo14/"; 43 | MNU.footerTarget = "target=_blank"; 44 | MNU.footerIssues = "https://github.com/opentecture/mindmapping/issues"; 45 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/archive/bookmarks.json: -------------------------------------------------------------------------------- 1 | {"date_added":"13194420279933299","id":"327752","meta_info":{"last_visited_desktop":"13194420288034124"},"name":"Open Structures: Help create an open-source building system","sync_transaction_version":"23266","type":"url","url":"https://makezine.com/2010/02/23/open-structures-help-create-an-open/","tags":["2010"]} 2 | {"date_added":"13194420498900154","id":"327758","name":"How to Make Everything Ourselves: Open Modular Hardware - LOW-TECH MAGAZINE","sync_transaction_version":"23270","type":"url","url":"http://www.lowtechmagazine.com/2012/12/how-to-make-everything-ourselves-open-modular-hardware.html","tags":["2012"]} 3 | {"date_added":"13194420492933207","id":"327757","name":"A Lot of Small Things | Frieze","sync_transaction_version":"23271","type":"url","url":"https://frieze.com/article/lot-small-things","tags":["2012"]} 4 | {"date_added":"13194420743054511","id":"327763","name":"TrussFab","sync_transaction_version":"23280","type":"url","url":"https://hpi.de/en/baudisch/projects/trussfab.html","tags":["2017"]} 5 | {"date_added":"13194420433765840","id":"327754","meta_info":{"last_visited_desktop":"13194420433767102"},"name":"OpenStructures – Institute without Boundaries","sync_transaction_version":"23281","type":"url","url":"http://institutewithoutboundaries.ca/?portfolio=open-structures","tags":["2017"]} 6 | {"date_added":"13194420446677080","id":"327755","meta_info":{"last_visited_desktop":"13194420773409283"},"name":"TrussFab","sync_transaction_version":"23285","type":"url","url":"https://dl.acm.org/citation.cfm?id=3026016","tags":["2017"]} 7 | {"date_added":"13194420422516826","id":"327753","meta_info":{"last_visited_desktop":"13194420422517849"},"name":"#OpenStructures hashtag on Twitter","sync_transaction_version":"23283","type":"url","url":"https://twitter.com/hashtag/OpenStructures?src=hash&lang=en","tags":["2017"]} 8 | {"date_added":"13194420468664932","id":"327756","name":"smow Blog Interview: Thomas Lommée - as designers our job is to generate solutions - smow Blog English","sync_transaction_version":"23275","type":"url","url":"https://www.smow.com/blog/2016/02/smow-blog-interview-thomas-lommee-designers-job-generate-solutions/","tags":["2016"]} 9 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/archive/view-a-line-bookmarks-by-category/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/archive/view-a-line-bookmarks-by-category/readme.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/archive/view-a-line-bookmarks-by-find/README.md: -------------------------------------------------------------------------------- 1 | 2 | [You are now in a GitHub source code view - click this link to view Read Me file as a web page]( https://opentecture.github.io/#mindmapping/view-a-line-bookmarks-by-find/README.md "View file as a web page." ) 3 | 4 |
6 | 7 |
8 | 9 | # [Opentecture Bookmarks View-a-line by Find Read Me]( #view-a-line-bookmarks-by-find/README.md ) 10 | 11 | 15 | 16 | ## Full Screen: [Opentecture Bookmarks View-a-line by Find]( https://opentecture.github.io/#mindmapping/view-a-line-bookmarks-by-find/view-a-line-bookmarks-by-find.html ) 17 | 18 | 19 | ## Concept 20 | 21 | * Content manager for web page bookmarks stored in JSON lines files. Find bookmarks by searching the text in a bookmark 22 | 23 | ## To Do / Wish List 24 | 25 | * 2019-02-19 ~ Add a given tag to all selected bookmarks 26 | 27 | 28 | ## Issues 29 | 30 | 31 | 32 | ## Links of Interest 33 | 34 | 35 | ## Change Log 36 | 37 | ### 2019-02-19 ~ Theo 38 | 39 | view-a-line-bookmarks-by-find R1.0 40 | 41 | * First commit 42 | 43 | 44 | *** 45 | 46 | #
47 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/archive/view-a-line-bookmarks-by-find/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/archive/view-a-line-bookmarks-by-find/latest.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/archive/view-a-line-bookmarks-by-find/readme.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/archive/view-a-line-bookmarks-by-host/README.md: -------------------------------------------------------------------------------- 1 | 2 | [You are now in a GitHub source code view - click this link to view Read Me file as a web page]( https://opentecture.github.io/indmapping/#sandbox/opentecture-bookmarks/view-a-line-bookmarks-by-host/README.md "View file as a web page." ) 3 | 4 |
6 | 7 |
8 | 9 | # [Opentecture Bookmarks View-a-line by Host Read Me]( #sandbox/opentecture-bookmarks/view-a-line-bookmarks-by-host/README.md ) 10 | 11 | 15 | 16 | ## Full Screen: [Opentecture Bookmarks View-a-line by Host]( https://opentecture.github.io/mindmapping/sandbox/opentecture-bookmarks/view-a-line-bookmarks-by-host/index.html ) 17 | 18 | 19 | ## Concept 20 | 21 | See also [Opentecture Bookmarks View-a-line Read Me]( https://opentecture.github.io/mindmapping/#sandbox/opentecture-bookmarks/view-a-line-bookmarks/README.md ) 22 | 23 | * Access very large numbers of bookmarks 24 | * View contents of many sites in a speedy fashion 25 | * View bookmarks listed by host name with ease and speed 26 | * Speed up identification with descriptions added on-the-fly 27 | * Curate the output using comments 28 | 29 | 30 | ## To Do / Wish List 31 | 32 | 33 | ## Issues 34 | 35 | 36 | 37 | ## Links of Interest 38 | 39 | * https://stackoverflow.com/questions/8498592/extract-hostname-name-from-string 40 | 41 | ## Change Log 42 | 43 | ### 2019-02-18 ~ Theo 44 | 45 | view-a-line-bookmarks-by-host R1.0 46 | 47 | * First commit 48 | 49 | 50 | *** 51 | 52 | #
53 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/archive/view-a-line-bookmarks-by-host/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/archive/view-a-line-bookmarks-by-host/readme.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/r-0-4/README.md: -------------------------------------------------------------------------------- 1 | 2 | [You are now in a GitHub source code view - click this link to view Read Me file as a web page]( https://pushme-pullyou.github.io/tootoo13/#xxxxx/README.md "View file as a web page." ) 3 | 4 |
6 | 7 |
8 | 9 | # [Add-a-line Bookmarks Read Me]( #xxxxx/README.md ) 10 | 11 | 17 | 18 | 19 |
20 | 21 | Concept 22 | 23 | 24 |
25 |
26 | 27 | To Do / Wish List 28 | 29 |
30 |
31 | 32 | Issues 33 | 34 |
35 |
36 | 37 | Things you can do u 38 | 39 | Using the Script 40 | 41 | * Click the three bars( 'hamburger menu icon' ) to slide the menu in and out 42 | * Click the Octocat icon to view or edit the source code on GitHub 43 | * Click on title to reload 44 | * Press Control-U/Command-Option-U to view the source code 45 | * Press Control-Shift-J/Command-Option-J to see if the JavaScript console reports any errors 46 | 47 | Enhancing the Script 48 | 49 | * Try adding a new menu module 50 | * Translate into another language 51 | 52 |
53 |
54 | 55 | Links of Interest 56 | 57 | 58 |
59 |
60 | 61 | Change Log 62 | 63 | ### 2019-05-12 ~ Theo 64 | 65 | * First commit 66 | 67 |
68 | 69 | *** 70 | 71 | #
72 | 73 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/r-0-4/com-comments-manage.js: -------------------------------------------------------------------------------- 1 | /* global */ 2 | /* jshint esversion: 6 */ 3 | /* jshint loopfunc: true */ 4 | 5 | 6 | const COM = { 7 | "copyright": "Copyright 2019 Opentecture authors. MIT License", 8 | "date": "2019-05-19", 9 | "version": "0.4.0-0" 10 | }; 11 | 12 | COM.getContents = function() { 13 | 14 | let htm = ""; 15 | for( comment of CM.comments ) { 16 | 17 | if (comment.targetId === CM.bookmark.id ) { 18 | 19 | htm += JSON.stringify( comment, null, '\t' ); 20 | } 21 | } 22 | 23 | htm = 24 | ` 25 |
26 | 27 | Edit Comments 28 | 29 |

30 | 31 | 32 | 33 |

34 | 35 |
New comment area
36 | 37 |
38 | Existing comments 39 | 40 |
41 | 42 |
43 | `; 44 | 45 | return htm; 46 | 47 | }; 48 | 49 | COM.setNewComment = function() { 50 | 51 | if ( !CM.bookmark) { alert( "Please select a bookmark first" ); return; }; 52 | 53 | const date = new Date().toISOString(); 54 | CM.commentId = BA.uuidv4(); 55 | 56 | const txt= 57 | ` 58 | { 59 | "date": "${ date }", 60 | "id": "${ CM.commentId }", 61 | "type": "comment", 62 | "targetId": "${ CM.bookmark.id }", 63 | "author": "NAME", 64 | "content": "comments" 65 | } 66 | `; 67 | 68 | const htm = ``; 69 | 70 | COMdivNewComment.innerHTML = htm; 71 | 72 | }; 73 | 74 | 75 | 76 | COM.updateComment = function() { 77 | 78 | let index = CM.jsonLines.findIndex( line => line.includes( `\"id":\"${ CM.commentId }\"` ) ); 79 | //console.log( 'index', index ); 80 | 81 | const line = JSON.stringify( JSON.parse( COMtxtComments.value ) ); 82 | //console.log( 'txtComments.value', line ); 83 | 84 | if ( index > 0 ) { 85 | 86 | CM.jsonLines[ index ] = line; 87 | 88 | } else { 89 | 90 | CM.jsonLines.push( line ); 91 | index = CM.jsonLines.length - 1; 92 | 93 | } 94 | 95 | console.log( 'CM.jsonLines[ index ] ', CM.jsonLines[ index ] ); 96 | 97 | }; -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/r-0-4/fm-file-manage.js: -------------------------------------------------------------------------------- 1 | /* globals */ 2 | /* jshint esversion: 6 */ 3 | /* jshint loopfunc: true */ 4 | 5 | const FM = { 6 | 7 | "copyright": "Copyright 2019 pushMe-pullYou authors. MIT License", 8 | "date": "2019-05-18", 9 | "version": "0.4.0-2" 10 | 11 | }; 12 | 13 | FM.xhr = new XMLHttpRequest(); 14 | 15 | FM.urlCORS = 'https://cors-anywhere.herokuapp.com/'; 16 | 17 | FM.requestFile = function( url, callback ) { 18 | 19 | xhr = FM.xhr; 20 | 21 | xhr.crossOrigin = 'anonymous'; 22 | xhr.open( 'GET', url, true ); 23 | xhr.onerror = function( xhr ) { console.log( 'error:', xhr ); }; 24 | //xhr.onprogress = function( xhr ) { console.log( 'bytes loaded:', xhr.loaded ); }; /// or something 25 | xhr.onload = callback; 26 | xhr.send( null ); 27 | 28 | }; 29 | 30 | 31 | 32 | FM.openFile = function( files ) { 33 | 34 | const reader = new FileReader(); 35 | reader.onload = function( event ) { 36 | 37 | CM.parseFile( reader.result ); 38 | 39 | }; 40 | 41 | reader.readAsText( files.files[ 0 ] ); 42 | 43 | }; 44 | 45 | 46 | 47 | FM.parseMarkdownToHtml = function( xhr ) { 48 | 49 | const response = xhr.target.response; 50 | showdown.setFlavor('github'); 51 | const converter = new showdown.Converter(); 52 | const html = converter.makeHtml( response ); 53 | 54 | divContents.innerHTML = html; 55 | window.scrollTo( 0, 0 ); 56 | 57 | }; 58 | 59 | 60 | 61 | FM.saveFile = function() { 62 | 63 | const lines = CM.jsonLines.join( "\n" ); 64 | 65 | let blob = new Blob( [ lines ] ); 66 | let a = document.body.appendChild( document.createElement( 'a' ) ); 67 | a.href = window.URL.createObjectURL( blob ); 68 | a.download = 'opentecture-bookmarks.json'; 69 | a.click(); 70 | a = null; 71 | 72 | }; 73 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/r-0-4/mnu-menu.js: -------------------------------------------------------------------------------- 1 | // Copyright 2019 pushMe-pullYou authors. MIT License 2 | /* global */ 3 | /* jshint esversion: 6 */ 4 | /* jshint loopfunc: true */ 5 | 6 | ///// Same as TooToo13 7 | 8 | const MNU = { 9 | "release": "1.0", 10 | "date": "2019-03-30" 11 | }; 12 | 13 | MNU.xDown = null; 14 | MNU.yDown = null; 15 | 16 | MNU.onTouchStart = function( event ) { 17 | 18 | MNU.xDown = event.touches[ 0 ].clientX; 19 | MNU.yDown = event.touches[ 0 ].clientY; 20 | 21 | }; 22 | 23 | 24 | 25 | MNU.onTouchMove = function(event) { 26 | 27 | // if ( ! MNU.xDown || ! MNU.yDown ) { return; } 28 | 29 | const xUp = event.touches[ 0 ].clientX; 30 | const yUp = event.touches[ 0 ].clientY; 31 | 32 | const xDiff = MNU.xDown - xUp; 33 | const yDiff = MNU.yDown - yUp; 34 | 35 | if ( Math.abs( xDiff ) > Math.abs( yDiff ) ) {// most significant 36 | 37 | if ( xDiff > 0 ) { 38 | 39 | MNU.toggleNavLeft(); 40 | //console.log( 'left swipe' ); 41 | 42 | } else { 43 | 44 | MNU.toggleNavLeft(); 45 | console.log( 'right swipe' ); 46 | 47 | } 48 | 49 | } else { 50 | 51 | if ( yDiff > 0 ) { 52 | 53 | console.log( 'up swipe' ); 54 | 55 | } else { 56 | 57 | console.log( 'down swipe' ); 58 | 59 | } 60 | 61 | } 62 | 63 | MNU.xDown = null; 64 | MNU.yDown = null; 65 | 66 | }; 67 | 68 | 69 | 70 | MNU.toggleNavLeft = function() { 71 | 72 | const width = getComputedStyle(document.documentElement).getPropertyValue( '--mnu-width' ).trim(); 73 | 74 | //console.log( 'width', width ); 75 | //console.log( 'navMenu.style.width', navMenu.style.width ); 76 | 77 | if ( navMenu.style.width === "0px" ) { // invisible 78 | 79 | navMenu.style.width = width; 80 | navMenu.style.padding = '1rem'; 81 | butHamburger.style.left = 'var( --mnu-width )'; 82 | divContainer.style.marginLeft = width; 83 | 84 | } else { 85 | 86 | navMenu.style.width = "0px"; 87 | navMenu.style.padding = '0'; 88 | butHamburger.style.left = '-3rem'; 89 | divContainer.style.marginLeft = "0px"; 90 | 91 | } 92 | 93 | }; -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/r2/ba-bookmark-add.js: -------------------------------------------------------------------------------- 1 | 2 | // Copyright 2019 pushMe-pullYou authors. MIT License 3 | /* global * / 4 | /* jshint esversion: 6 */ 5 | /* jshint loopfunc: true */ 6 | 7 | 8 | const BA = { "release": "1.0", "date": "2019-03-30" }; 9 | 10 | 11 | 12 | BA.bookmarkAddInit = function( id ){ 13 | 14 | divContents.innerHTML = tmpNewBookmark.innerHTML; 15 | 16 | inpId.value = FM.bookmarks.length + 1; 17 | 18 | inpDateAdded.value = new Date().toISOString(); 19 | 20 | inpType.value = "url"; 21 | 22 | }; 23 | 24 | 25 | 26 | BA.bookmarkAddUpdateTextarea = function() { 27 | 28 | const txt = 29 | `{ 30 | "name": "${ inpName.value }", 31 | "url": "${ inpUrl.value }", 32 | "dateAdded": "${ inpDateAdded.value }", 33 | "id": "${ inpId.value }", 34 | "type": "${ inpType.value }", 35 | "images": "${ inpImages.value }", 36 | "tags": "${ inpTags.value }", 37 | "source": "${ selSource.value }", 38 | "description": "${ txtDescription.value }", 39 | "iframeCompatible": "${ inpIframeOk.checked }" 40 | }`; 41 | 42 | BAtxtBookmark.value = txt; 43 | 44 | }; 45 | 46 | 47 | 48 | BA.bookmarkAdd = function( id ) { 49 | 50 | const index = FM.jsonLines.findIndex( line => line.includes( `\"id":\"${ id }\"` ) ) 51 | console.log( 'index', index ); 52 | 53 | json = JSON.parse( BAtxtBookmark.value ); 54 | line = JSON.stringify( json ); 55 | console.log( 'FM.jsonLines', line ); 56 | 57 | if ( index >= 0 ) { 58 | 59 | FM.jsonLines[ index ] = line; 60 | 61 | } else if ( json.url !== "" ) { 62 | 63 | FM.jsonLines.push( line ); 64 | 65 | } else { 66 | 67 | BAtxtBookmark.value = 'Please add a URL'; 68 | 69 | return; 70 | 71 | } 72 | 73 | 74 | for ( let line of FM.jsonLines ) { 75 | //console.log( 'line', line ); 76 | 77 | if ( line.slice( 0, 1 ) !== "{" ) { continue; } 78 | 79 | const jsonl = JSON.parse( line ); 80 | //console.log( 'jsonl', jsonl ); 81 | 82 | if ( jsonl.type === "url" ) { 83 | 84 | FM.bookmarks.push( jsonl ); 85 | 86 | } 87 | 88 | } 89 | 90 | console.log( 'FM.bookmarks[ FM.bookmarks.length - 1 ] ', FM.bookmarks[ FM.bookmarks.length - 1 ] ); 91 | 92 | } 93 | 94 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/r2/blbh-bookmarks-list-by-host.js: -------------------------------------------------------------------------------- 1 | // Copyright 2019 pushMe-pullYou authors. MIT License 2 | /* global * / 3 | /* jshint esversion: 6 */ 4 | /* jshint loopfunc: true */ 5 | 6 | const BLBH = { "release": "1.0", "date": "2019-03-31" }; 7 | 8 | BLBH.description = 9 | ` 10 | Display bookmarks by host 11 | `; 12 | 13 | 14 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/r2/fm-file-manage.js: -------------------------------------------------------------------------------- 1 | // Copyright 2019 pushMe-pullYou authors. MIT License 2 | /* global * / 3 | /* jshint esversion: 6 */ 4 | /* jshint loopfunc: true */ 5 | 6 | const FM = { "release": "0.4.0", "date": "2019-04-20" }; 7 | 8 | FM.bookmarks = []; 9 | FM.jsonLines = []; 10 | FM.urlJson = "opentecture-bookmarks-2.json"; 11 | 12 | 13 | 14 | FM.requestFile = function( url, callback ) { 15 | 16 | const xhr = new XMLHttpRequest(); 17 | xhr.open( 'GET', url, true ); 18 | xhr.onerror = function( xhr ) { console.log( 'error:', xhr ); }; 19 | //xhr.onprogress = function( xhr ) { console.log( 'bytes loaded:', xhr.loaded ); }; /// or something 20 | xhr.onload = callback; 21 | xhr.send( null ); 22 | 23 | }; 24 | 25 | 26 | 27 | FM.openFile = function( files ) { 28 | 29 | const reader = new FileReader(); 30 | reader.onload = function( event ) { 31 | 32 | FM.parseFile( reader.result ); 33 | 34 | } 35 | 36 | reader.readAsText( files.files[ 0 ] ); 37 | 38 | }; 39 | 40 | 41 | 42 | FM.parseFile = function( obj ) { 43 | 44 | const data = obj.target ? obj.target.response : obj; 45 | 46 | FM.bookmarks = []; 47 | FM.descriptions = []; 48 | FM.comments = []; 49 | //index = 0; 50 | 51 | FM.jsonLines = data.split(/\r\n|\n/); 52 | 53 | for ( let line of FM.jsonLines ) { 54 | //console.log( 'line', line ); 55 | 56 | if ( line.slice( 0, 1 ) !== "{" ) { continue; } 57 | 58 | const jsonl = JSON.parse( line ); 59 | //console.log( 'jsonl', jsonl ); 60 | 61 | if ( jsonl.type === "url" ) { 62 | 63 | FM.bookmarks.push( jsonl ); 64 | 65 | } else if ( jsonl.type === "description" ) { 66 | 67 | FM.descriptions.push( jsonl ); 68 | 69 | }else if ( jsonl.type === "comment" ) { 70 | 71 | FM.comments.push( jsonl ); 72 | 73 | } else { 74 | 75 | console.log( 'oops', jsonl ); 76 | 77 | } 78 | 79 | } 80 | //console.log( 'bookmarks', FM.bookmarks ); 81 | 82 | //BLBS.setMenuHeaders(); // will change to setting an event here 83 | 84 | setMenuItemsByUrl(FM.bookmarks); 85 | 86 | }; 87 | 88 | 89 | 90 | 91 | 92 | FM.parseMarkdownToHtml = function( xhr ) { 93 | 94 | const response = xhr.target.response; 95 | showdown.setFlavor('github'); 96 | const converter = new showdown.Converter(); 97 | const html = converter.makeHtml( response ); 98 | 99 | divContents.innerHTML = html; 100 | window.scrollTo( 0, 0 ); 101 | 102 | } 103 | 104 | 105 | 106 | 107 | FM.saveFile = function() { 108 | 109 | const lines = FM.jsonLines.join( "\n" ); 110 | 111 | let blob = new Blob( [ lines ] ); 112 | let a = document.body.appendChild( document.createElement( 'a' ) ); 113 | a.href = window.URL.createObjectURL( blob ); 114 | a.download = 'add-a-line-bookmarks.json'; 115 | a.click(); 116 | a = null; 117 | 118 | }; 119 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/r2/mnu-menu.js: -------------------------------------------------------------------------------- 1 | // Copyright 2019 pushMe-pullYou authors. MIT License 2 | /* global * / 3 | /* jshint esversion: 6 */ 4 | /* jshint loopfunc: true */ 5 | 6 | ///// Same as TooToo13 7 | 8 | const MNU = { "release": "1.0", "date": "2019-03-30" }; 9 | 10 | MNU.xDown = null; 11 | MNU.yDown = null; 12 | 13 | MNU.onTouchStart = function( event ) { 14 | 15 | MNU.xDown = event.touches[ 0 ].clientX; 16 | MNU.yDown = event.touches[ 0 ].clientY; 17 | 18 | }; 19 | 20 | 21 | 22 | MNU.onTouchMove = function(event) { 23 | 24 | // if ( ! MNU.xDown || ! MNU.yDown ) { return; } 25 | 26 | const xUp = event.touches[ 0 ].clientX; 27 | const yUp = event.touches[ 0 ].clientY; 28 | 29 | const xDiff = MNU.xDown - xUp; 30 | const yDiff = MNU.yDown - yUp; 31 | 32 | if ( Math.abs( xDiff ) > Math.abs( yDiff ) ) {// most significant 33 | 34 | if ( xDiff > 0 ) { 35 | 36 | MNU.toggleNavLeft(); 37 | //console.log( 'left swipe' ); 38 | 39 | } else { 40 | 41 | MNU.toggleNavLeft(); 42 | console.log( 'right swipe' ); 43 | 44 | } 45 | 46 | } else { 47 | 48 | if ( yDiff > 0 ) { 49 | 50 | console.log( 'up swipe' ); 51 | 52 | } else { 53 | 54 | console.log( 'down swipe' ); 55 | 56 | } 57 | 58 | } 59 | 60 | MNU.xDown = null; 61 | MNU.yDown = null; 62 | 63 | }; 64 | 65 | 66 | 67 | MNU.toggleNavLeft = function() { 68 | 69 | const width = getComputedStyle(document.documentElement).getPropertyValue( '--mnu-width' ).trim(); 70 | 71 | //console.log( 'width', width ); 72 | //console.log( 'navMenu.style.width', navMenu.style.width ); 73 | 74 | if ( navMenu.style.width === "0px" ) { // invisible 75 | 76 | navMenu.style.width = width; 77 | navMenu.style.padding = '1rem'; 78 | butHamburger.style.left = 'var( --mnu-width )'; 79 | divContainer.style.marginLeft = width; 80 | 81 | } else { 82 | 83 | navMenu.style.width = "0px"; 84 | navMenu.style.padding = '0'; 85 | butHamburger.style.left = '-3rem'; 86 | divContainer.style.marginLeft = "0px"; 87 | 88 | } 89 | 90 | } -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/r2/opentecture-bookmarks.json: -------------------------------------------------------------------------------- 1 | {"name":"goog","url":"https://www.google.com/","dateAdded":"2019-03-30T22:30:40.811Z","id":"1","type":"url","images":"","tags":"aaa","source":"","description":"","iframeCompatible":"false"} 2 | {"name":"new tab","url":"https://theo-armour.github.io/snippets/new-tab/getNewTabFile2.html","dateAdded":"2019-03-30T22:30:52.716Z","id":"2","type":"url","images":"","tags":"ccc","source":"","description":"","iframeCompatible":"false"} 3 | {"name":"red","url":"https://www.reddit.com/","dateAdded":"2019-03-30T22:47:36.271Z","id":"3","type":"url","images":"","tags":"bbb","source":"","description":"","iframeCompatible":"false"} -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/r3/mnu-menu.js: -------------------------------------------------------------------------------- 1 | // Copyright 2019 pushMe-pullYou authors. MIT License 2 | /* global * / 3 | /* jshint esversion: 6 */ 4 | /* jshint loopfunc: true */ 5 | 6 | ///// Same as TooToo13 7 | 8 | const MNU = { "release": "1.0", "date": "2019-03-30" }; 9 | 10 | MNU.xDown = null; 11 | MNU.yDown = null; 12 | 13 | MNU.onTouchStart = function( event ) { 14 | 15 | MNU.xDown = event.touches[ 0 ].clientX; 16 | MNU.yDown = event.touches[ 0 ].clientY; 17 | 18 | }; 19 | 20 | 21 | 22 | MNU.onTouchMove = function(event) { 23 | 24 | // if ( ! MNU.xDown || ! MNU.yDown ) { return; } 25 | 26 | const xUp = event.touches[ 0 ].clientX; 27 | const yUp = event.touches[ 0 ].clientY; 28 | 29 | const xDiff = MNU.xDown - xUp; 30 | const yDiff = MNU.yDown - yUp; 31 | 32 | if ( Math.abs( xDiff ) > Math.abs( yDiff ) ) {// most significant 33 | 34 | if ( xDiff > 0 ) { 35 | 36 | MNU.toggleNavLeft(); 37 | //console.log( 'left swipe' ); 38 | 39 | } else { 40 | 41 | MNU.toggleNavLeft(); 42 | console.log( 'right swipe' ); 43 | 44 | } 45 | 46 | } else { 47 | 48 | if ( yDiff > 0 ) { 49 | 50 | console.log( 'up swipe' ); 51 | 52 | } else { 53 | 54 | console.log( 'down swipe' ); 55 | 56 | } 57 | 58 | } 59 | 60 | MNU.xDown = null; 61 | MNU.yDown = null; 62 | 63 | }; 64 | 65 | 66 | 67 | MNU.toggleNavLeft = function() { 68 | 69 | const width = getComputedStyle(document.documentElement).getPropertyValue( '--mnu-width' ).trim(); 70 | 71 | //console.log( 'width', width ); 72 | //console.log( 'navMenu.style.width', navMenu.style.width ); 73 | 74 | if ( navMenu.style.width === "0px" ) { // invisible 75 | 76 | navMenu.style.width = width; 77 | navMenu.style.padding = '1rem'; 78 | butHamburger.style.left = 'var( --mnu-width )'; 79 | divContainer.style.marginLeft = width; 80 | 81 | } else { 82 | 83 | navMenu.style.width = "0px"; 84 | navMenu.style.padding = '0'; 85 | butHamburger.style.left = '-3rem'; 86 | divContainer.style.marginLeft = "0px"; 87 | 88 | } 89 | 90 | } -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/readme.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-0/README.md: -------------------------------------------------------------------------------- 1 | # Add-a-line Bookmarks Read Me 2 | 3 | [Source Code ]( https://github.com/opentecture/mindmapping/tree/master/sandbox/opentecture-bookmarks/add-a-line-bookmarks ) 4 | 5 |
6 | 7 | Concept 8 | 9 | Basic bookmark manager 10 | 11 |
12 | 13 |
14 | 15 | To Do / Wish List 16 | 17 | 18 | * 2019-06-03 ~ Theo ~ Save to and read from gists 19 | * 2019-06-03 ~ Theo ~ Remove dead links 20 | 21 |
22 | 23 |
24 | 25 | Issues 26 | 27 | 28 |
29 | 30 |
31 | 32 | Change Log 33 | 34 | ### 2019-06-10 ~ Theo 35 | 36 | 37 | To Do dealt with 38 | 39 | * 2019-06-03 ~ Theo ~ Menus: add back the variety of displays: domain, tag etc 40 | * 2019-06-03 ~ Theo ~ File open 41 | * 2019-06-03 ~ Theo ~ Finish adding comments 42 | * 2019-06-03 ~ Theo ~ Tags: add trimming, sorting, removing duplicates 43 | * 2019-06-03 ~ Theo ~ add favicon of the site 44 | * 2019-06-03 ~ Theo ~ Add search and various sorts 45 | 46 | ### 2019-06-08 ~ Theo 47 | 48 | * F - BTG.js: Add bookmarks by tag 49 | * F - BDM.js: Add bookmarks by domain 50 | * R - AAL: refactor all 51 | 52 | ### 2019-06-03 ~ Theo 53 | 54 | * Added four modules or seven total or something 55 | 56 | I am really enjoying this little effort. Features are coming in thick and fast. 57 | 58 | ### 2019-06-01 ~ Theo 59 | 60 | * First commit 61 | 62 |
63 | 64 | *** 65 | 66 | #
67 | 68 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-0/js/bme-bookmarks-edit.js: -------------------------------------------------------------------------------- 1 | /* global */ 2 | /* jshint esversion: 6 */ 3 | /* jshint loopfunc: true */ 4 | 5 | 6 | BME = { 7 | 8 | "copyright": "Copyright 2019 pushMe-pullYou authors. MIT License", 9 | "date": "2019-06-08", 10 | "description": "Edit bookmark data above then view and save or delete here", 11 | "version": "0.5.0-1", 12 | 13 | }; 14 | 15 | 16 | BME.getMenuBookmarkEdit = function() { 17 | 18 | //
19 | // 20 | const htm = 21 | ` 22 |
23 | 24 | Bookmark Edit ~ BME V ${ BME.version } ~ ${ BME.date } 25 | 26 |

${ BME.description }

27 | 28 | 29 |

30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 |

40 | 41 |

42 | 43 |

44 | 45 |
46 | 47 | 48 | `; 49 | 50 | return htm; 51 | 52 | }; 53 | 54 | 55 | BME.setTextareaJson = function() { 56 | 57 | const tags = `["${ BMinpTags.value.slice().replace( /,/g, '","') }"]`; 58 | const txt = 59 | `{ 60 | "url": "${ BMinpUrl.value }", 61 | "name": "${ BMinpName.value }", 62 | "dateAdd": "${ BMinpDateAdd.value }", 63 | "dateUpdate": "${ BMinpDateUpdate.value }", 64 | "id": "${ BMinpId.value }", 65 | "type": "${ BMinpType.value }", 66 | "images": [ ${ BMinpImages.value } ], 67 | "tags": ${ tags }, 68 | "description": "${ BMtxtDescription.value }" 69 | }`; 70 | 71 | BMEtxtJson.value = txt; 72 | 73 | }; 74 | 75 | 76 | 77 | 78 | 79 | BME.setJsonTagSets = function() { 80 | 81 | const index = BM.lines.findIndex( line => line.includes( `\"${ BMinpId.value }\"` ) ); 82 | //console.log( 'index', index ); 83 | 84 | const json = JSON.parse( BMEtxtJson.value ); 85 | const line = JSON.stringify( json ); 86 | //console.log( 'line', line ); 87 | 88 | if ( index >= 0 ) { 89 | 90 | BM.lines[ index ] = line; 91 | 92 | } else if ( json.url !== "" ) { 93 | 94 | BM.lines.push( line ); 95 | 96 | } else { 97 | 98 | BMtxtJson.value = 'Please add a URL'; 99 | 100 | return; 101 | 102 | } 103 | 104 | }; 105 | 106 | 107 | 108 | BME.setJsonDelete = function() { 109 | 110 | const index = BM.lines.findIndex( line => line.includes( `\"${ BMinpId.value }\"` ) ); 111 | //console.log( 'index', index ); 112 | 113 | BM.lines.splice( index, 1 ); 114 | 115 | console.log( 'BM.lines', BM.lines.length ); 116 | 117 | }; -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-0/js/bmn-bookmarks-new.js: -------------------------------------------------------------------------------- 1 | /* global BM, BMNdivDrop, BMinpUrl */ 2 | /* jshint esversion: 6 */ 3 | /* jshint loopfunc: true */ 4 | 5 | 6 | const BMN = { 7 | 8 | "copyright": "Copyright 2019 pushMe-pullYou authors. MIT License", 9 | "date": "2019-06-08", 10 | "description": "Clear input fields and set screen up to add a new bookmark", 11 | "version": "0.5.0-1", 12 | 13 | }; 14 | 15 | 16 | BMN.getMenuBookmarkNew = function() { 17 | 18 | const htm = 19 | ` 20 |
21 | 22 | Bookmark New ~ BMN V ${ BMN.version } ~ ${ BMN.date } 23 | 24 |

${ BMN.description }

25 | 26 |

27 | 28 |

29 | 30 |
31 | 32 | `; 33 | 34 | return htm; 35 | 36 | }; 37 | 38 | 39 | BMN.onToggle = function() { 40 | 41 | }; 42 | 43 | 44 | 45 | BMN.onInput = function() { 46 | 47 | const htm = BMNdivDrop.innerHTML; 48 | //console.log( 'htm', htm ); 49 | 50 | //if ( !htm ) { return; } 51 | 52 | const url = htm.match( /href="(.*?)"/i )[ 1 ]; 53 | //console.log( 'url', url ); 54 | 55 | const name = htm.match ( />(.*?)<\/a>/i)[ 1 ]; 56 | 57 | BMinpUrl.value = url; 58 | BMinpName.value = name; 59 | 60 | BMinpId.value = BMinpId.value ? BMinpId.value : BM.uuidv4(); 61 | BMinpDateAdd.value = BMinpDateAdd.value ? BMinpDateAdd.value : new Date().toISOString(); 62 | BMinpDateUpdate.value = BMinpDateAdd.value; 63 | 64 | BMinpType.value = "url"; 65 | BMinpTags.value = []; 66 | BMtxtDescription.value = ""; 67 | 68 | BMdivUrl.innerHTML = "url ❐".link( url ); 69 | 70 | //ifr.src = url; 71 | 72 | }; 73 | 74 | 75 | 76 | BMN.setBookmarkNew = function() { 77 | 78 | BMNdivDrop.innerHTML = ""; 79 | 80 | BMinpUrl.value = ""; 81 | BMinpUrl.placeholder = "https://example.com"; 82 | 83 | BMinpName.value = ""; 84 | BMinpName.placeholder = "name of example"; 85 | 86 | BMinpDateAdd.value = new Date().toISOString(); 87 | BMinpDateUpdate.value = BMinpDateAdd.value; 88 | BMinpId.value = BM.uuidv4(); 89 | BMinpType.value = "url"; 90 | BMinpTags.value = []; 91 | 92 | BMtxtDescription.value = ""; 93 | BMtxtDescription.placeholder = "Example.com is a good site for testing things"; 94 | 95 | BMdivUrl.innerHTML = "url"; 96 | 97 | }; 98 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-0/js/tga-tags-add.js: -------------------------------------------------------------------------------- 1 | /* global BM, BMinpTags, TGAdivTagsSelect */ 2 | /* jshint esversion: 6 */ 3 | /* jshint loopfunc: true */ 4 | 5 | 6 | const TGA = { 7 | 8 | "copyright": "Copyright 2019 pushMe-pullYou authors. MIT License", 9 | "date": "2019-06-02", 10 | "description": "Add curated (hopefully) tags to bookmarks", 11 | "version": "0.5.0-0", 12 | 13 | }; 14 | 15 | 16 | 17 | TGA.getMenuTagsAdd = function() { 18 | 19 | const htm = 20 | ` 21 |
22 | 23 | Tags Add ~ TGA V ${ TGA.version } ~ ${ TGA.date } 24 | 25 |

${ TGA.description }

26 | 27 |
28 | 29 |
30 | `; 31 | 32 | return htm; 33 | 34 | }; 35 | 36 | 37 | 38 | TGA.onToggle = function() { 39 | 40 | 41 | const tagSets = BM.lines.filter( line => line.includes( "tagset" ) ); 42 | //console.log( '', tagSets ); 43 | 44 | let htm = ""; 45 | 46 | for ( let tagSet of tagSets ) { 47 | 48 | const json = JSON.parse( tagSet ); 49 | 50 | const options = json.tags.map( tag => `` ).join(); 51 | //console.log( 'options ', options ); 52 | 53 | htm += 54 | `

55 | 56 | ${json.name }
57 | 58 | 59 |

 `; 60 | 61 | } 62 | 63 | TGAdivTagsSelect.innerHTML = htm; 64 | 65 | }; 66 | 67 | 68 | 69 | TGA.addTag = function( select ) { 70 | 71 | const comma = BMinpTags.value === "" || BMinpTags.value.endsWith( ",") ? "" : ","; 72 | 73 | BMinpTags.value += comma + select.value; 74 | 75 | }; -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-0/readme.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Open Index or Markdown 6 | 7 | 8 | 9 | 10 | 18 | 19 | 20 | 21 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-01/README.md: -------------------------------------------------------------------------------- 1 | # Add-a-line Bookmarks Read Me 2 | 3 | [Source Code ]( https://github.com/opentecture/mindmapping/tree/master/sandbox/opentecture-bookmarks/add-a-line-bookmarks ) 4 | 5 |
6 | 7 | Concept 8 | 9 | Basic bookmark manager 10 | 11 |
12 | 13 |
14 | 15 | To Do / Wish List 16 | 17 | * 2019-06-23 ~ Theo ~ Filter by multiple tags 18 | * 2019-06-23 ~ Theo ~ Filter by content 19 | * 2019-06-23 ~ Theo ~ Add tags to multiple bookmarks at same time 20 | * 2019-06-23 ~ Theo ~ Refresh memory after a deletion 21 | * 2019-06-23 ~ Theo ~ meta tags with description of entire project, copyright, license etc 22 | * 2019-06-03 ~ Theo ~ Save to and read from gists 23 | * 2019-06-03 ~ Theo ~ Remove dead links 24 | 25 |
26 | 27 |
28 | 29 | Issues 30 | 31 | * 2019-06-23 ~ Theo ~ Adding commenys broken? 32 | * 2019-06-23 ~ Theo ~ Add comments by url instead of bookmark id - or keep both? 33 | 34 |
35 | 36 |
37 | 38 | Change Log 39 | 40 | ### 2019-06-23 ~ Theo 41 | 42 | * Many fixes / looking even better / almost workable 43 | 44 | ### 2019-06-10 ~ Theo 45 | 46 | 47 | To Do dealt with 48 | 49 | * 2019-06-03 ~ Theo ~ Menus: add back the variety of displays: domain, tag etc 50 | * 2019-06-03 ~ Theo ~ File open 51 | * 2019-06-03 ~ Theo ~ Finish adding comments 52 | * 2019-06-03 ~ Theo ~ Tags: add trimming, sorting, removing duplicates 53 | * 2019-06-03 ~ Theo ~ add favicon of the site 54 | * 2019-06-03 ~ Theo ~ Add search and various sorts 55 | 56 | ### 2019-06-08 ~ Theo 57 | 58 | * F - BTG.js: Add bookmarks by tag 59 | * F - BDM.js: Add bookmarks by domain 60 | * R - AAL: refactor all 61 | 62 | ### 2019-06-03 ~ Theo 63 | 64 | * Added four modules or seven total or something 65 | 66 | I am really enjoying this little effort. Features are coming in thick and fast. 67 | 68 | ### 2019-06-01 ~ Theo 69 | 70 | * First commit 71 | 72 |
73 | 74 | *** 75 | 76 | #
77 | 78 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-01/js/bme-bookmarks-edit.js: -------------------------------------------------------------------------------- 1 | /* global */ 2 | /* jshint esversion: 6 */ 3 | /* jshint loopfunc: true */ 4 | 5 | 6 | BME = { 7 | 8 | "copyright": "Copyright 2019 pushMe-pullYou authors. MIT License", 9 | "date": "2019-06-08", 10 | "description": "Edit bookmark data above then view and save or delete here", 11 | "version": "0.5.0-1", 12 | 13 | }; 14 | 15 | 16 | BME.getMenuBookmarkEdit = function() { 17 | 18 | //
19 | // 20 | const htm = 21 | ` 22 |
23 | 24 | Bookmark Edit ~ BME V ${ BME.version } ~ ${ BME.date } 25 | 26 |

${ BME.description }

27 | 28 | 29 |

30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 |

40 | 41 |

42 | 43 |

44 | 45 |
46 | 47 | 48 | `; 49 | 50 | return htm; 51 | 52 | }; 53 | 54 | 55 | BME.setTextareaJson = function() { 56 | 57 | const tags = `["${ BMinpTags.value.slice().replace( /,/g, '","') }"]`; 58 | const txt = 59 | `{ 60 | "url": "${ BMinpUrl.value }", 61 | "name": "${ BMinpName.value }", 62 | "dateAdd": "${ BMinpDateAdd.value }", 63 | "dateUpdate": "${ BMinpDateUpdate.value }", 64 | "id": "${ BMinpId.value }", 65 | "type": "${ BMinpType.value }", 66 | "images": [ ${ BMinpImages.value } ], 67 | "favicon": "${ BMinpFavicon.value }", 68 | "tags": ${ tags }, 69 | "description": "${ BMtxtDescription.value }" 70 | }`; 71 | 72 | BMEtxtJson.value = txt; 73 | 74 | }; 75 | 76 | 77 | 78 | 79 | 80 | BME.setJsonTagSets = function() { 81 | 82 | const index = BM.lines.findIndex( line => line.includes( `\"${ BMinpId.value }\"` ) ); 83 | //console.log( 'index', index ); 84 | 85 | const json = JSON.parse( BMEtxtJson.value ); 86 | const line = JSON.stringify( json ); 87 | //console.log( 'line', line ); 88 | 89 | if ( index >= 0 ) { 90 | 91 | BM.lines[ index ] = line; 92 | 93 | } else if ( json.url !== "" ) { 94 | 95 | BM.lines.push( line ); 96 | 97 | } else { 98 | 99 | BMtxtJson.value = 'Please add a URL'; 100 | 101 | return; 102 | 103 | } 104 | 105 | }; 106 | 107 | 108 | 109 | BME.setJsonDelete = function() { 110 | 111 | const index = BM.lines.findIndex( line => line.includes( `\"${ BMinpId.value }\"` ) ); 112 | //console.log( 'index', index ); 113 | 114 | BM.lines.splice( index, 1 ); 115 | 116 | console.log( 'BM.lines', BM.lines.length ); 117 | 118 | }; -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-01/js/bmn-bookmarks-new.js: -------------------------------------------------------------------------------- 1 | /* global BM, BMNdivDrop, BMinpUrl */ 2 | /* jshint esversion: 6 */ 3 | /* jshint loopfunc: true */ 4 | 5 | 6 | const BMN = { 7 | 8 | "copyright": "Copyright 2019 pushMe-pullYou authors. MIT License", 9 | "date": "2019-06-08", 10 | "description": "Clear input fields and set screen up to add a new bookmark", 11 | "version": "0.5.0-1", 12 | 13 | }; 14 | 15 | 16 | BMN.getMenuBookmarkNew = function() { 17 | 18 | const htm = 19 | ` 20 |
21 | 22 | Bookmark New ~ BMN V ${ BMN.version } ~ ${ BMN.date } 23 | 24 |

${ BMN.description }

25 | 26 |

27 | 28 |

29 | 30 |
31 | 32 | `; 33 | 34 | return htm; 35 | 36 | }; 37 | 38 | 39 | BMN.onToggle = function() { 40 | 41 | }; 42 | 43 | 44 | 45 | BMN.onInput = function() { 46 | 47 | const htm = BMNdivDrop.innerHTML; 48 | //console.log( 'htm', htm ); 49 | 50 | //if ( !htm ) { return; } 51 | 52 | const url = htm.match( /href="(.*?)"/i )[ 1 ]; 53 | //console.log( 'url', url ); 54 | 55 | const name = htm.match ( />(.*?)<\/a>/i)[ 1 ]; 56 | 57 | BMinpUrl.value = url; 58 | BMinpName.value = name; 59 | 60 | BMinpId.value = BMinpId.value ? BMinpId.value : BM.uuidv4(); 61 | BMinpDateAdd.value = BMinpDateAdd.value ? BMinpDateAdd.value : new Date().toISOString(); 62 | BMinpDateUpdate.value = BMinpDateAdd.value; 63 | 64 | BMinpType.value = "url"; 65 | BMinpTags.value = []; 66 | BMtxtDescription.value = ""; 67 | 68 | BMdivUrl.innerHTML = "url ❐".link( url ); 69 | 70 | //ifr.src = url; 71 | 72 | }; 73 | 74 | 75 | 76 | BMN.setBookmarkNew = function() { 77 | 78 | BMNdivDrop.innerHTML = ""; 79 | 80 | BMinpUrl.value = ""; 81 | BMinpUrl.placeholder = "https://example.com"; 82 | 83 | BMinpName.value = ""; 84 | BMinpName.placeholder = "name of example"; 85 | 86 | BMinpDateAdd.value = new Date().toISOString(); 87 | BMinpDateUpdate.value = BMinpDateAdd.value; 88 | BMinpId.value = BM.uuidv4(); 89 | BMinpType.value = "url"; 90 | BMinpTags.value = []; 91 | 92 | BMtxtDescription.value = ""; 93 | BMtxtDescription.placeholder = "Example.com is a good site for testing things"; 94 | 95 | BMdivUrl.innerHTML = "url"; 96 | 97 | }; 98 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-01/js/cor-core.js: -------------------------------------------------------------------------------- 1 | /* globals FOB */ 2 | /* jshint esversion: 6 */ 3 | /* jshint loopfunc: true */ 4 | 5 | 6 | const COR = { 7 | "copyright": "Copyright 2019 Opentecture authors. MIT License", 8 | "date": "2019-06-23", 9 | "description": "core - Contains local overrides", 10 | "helpFile": "cor-core/README.md", 11 | "version": "0.0.0-1cor", 12 | }; 13 | 14 | 15 | //THM.themeUrlStorage = 'addALineTheme'; // set for each instance in HTML file 16 | //THM.cssBasic = "https://pushme-pullyou.github.io/tootoo14/js-14-03/style.css"; 17 | //THM.backgroundColor = "#eed" 18 | 19 | FOB.urlDefaultFile = "../../bookmarks.json"; 20 | 21 | // For main menu header 22 | MNU.helpFile = "../../README.md"; 23 | 24 | MNU.description = `Basic bookmark manager and editor with tagging, descriptions and comments`; 25 | 26 | MNU.urlSourceCode = "https://github.com/opentecture/mindmapping/tree/master/sandbox/opentecture-bookmarks"; 27 | 28 | MNU.homeText = "opentecture"; 29 | MNU.homeTitle = "Building to a common, scalable standard creates new opportunities to design and create objects and spaces in a collaborative way."; 30 | MNU.homeUrl = "https://www.opentecture.com/"; 31 | 32 | MNU.repoText = "mindmapping"; 33 | MNU.repoTitle = "Mindmapping is a collection of basic plain-vanilla JavaScript scripts for idea management using GitHub pages, 3D and whatever else comes to mind"; 34 | MNU.repoUrl = "https://opentecture.github.io/mindmapping"; 35 | 36 | MNU.appText = "bookmarks"; 37 | MNU.appTitle = ""; //"Basic html content management script with sliding menu, css theme selection, Markdown to HTML, drag and drop file reading capability, access to frequently used pages and more"; 38 | MNU.appUrl = "https://opentecture.github.io/mindmapping/#sandbox/opentecture-bookmarks/README.md"; 39 | 40 | MNU.footerPopupUrl = "https://pushme-pullyou.github.io/tootoo14/"; 41 | MNU.footerTarget = "target=_blank"; 42 | MNU.footerIssues = "https://github.com/opentecture/mindmapping/issues"; 43 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-01/js/tga-tags-add.js: -------------------------------------------------------------------------------- 1 | /* global BM, BMinpTags, TGAdivTagsSelect */ 2 | /* jshint esversion: 6 */ 3 | /* jshint loopfunc: true */ 4 | 5 | 6 | const TGA = { 7 | 8 | "copyright": "Copyright 2019 pushMe-pullYou authors. MIT License", 9 | "date": "2019-06-02", 10 | "description": "Add curated (hopefully) tags to bookmarks", 11 | "version": "0.5.0-0", 12 | 13 | }; 14 | 15 | 16 | 17 | TGA.getMenuTagsAdd = function() { 18 | 19 | const htm = 20 | ` 21 |
22 | 23 | Tags Add ~ TGA V ${ TGA.version } ~ ${ TGA.date } 24 | 25 |

${ TGA.description }

26 | 27 |
28 | 29 |
30 | `; 31 | 32 | return htm; 33 | 34 | }; 35 | 36 | 37 | 38 | TGA.onToggle = function() { 39 | 40 | 41 | const tagSets = BM.lines.filter( line => line.includes( "tagset" ) ); 42 | //console.log( '', tagSets ); 43 | 44 | let htm = ""; 45 | 46 | for ( let tagSet of tagSets ) { 47 | 48 | const json = JSON.parse( tagSet ); 49 | 50 | const options = json.tags.map( tag => `` ).join(); 51 | //console.log( 'options ', options ); 52 | 53 | htm += 54 | `

55 | 56 | ${json.name }
57 | 58 | 59 |

 `; 60 | 61 | } 62 | 63 | TGAdivTagsSelect.innerHTML = htm; 64 | 65 | }; 66 | 67 | 68 | 69 | TGA.addTag = function( select ) { 70 | 71 | const comma = BMinpTags.value === "" || BMinpTags.value.endsWith( ",") ? "" : ","; 72 | 73 | BMinpTags.value += comma + select.value; 74 | 75 | }; -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-01/popup.md: -------------------------------------------------------------------------------- 1 | ### Pop-Up menu as splash screen 2 | 3 | Hello, world! 4 | 5 | Click anywhere outside this popup to hide 6 | 7 | Press Control-Shift-J|Command-Option-J to see if the JavaScript console reports any errors 8 | 9 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-01/readme.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Open Index or Markdown 6 | 7 | 8 | 9 | 10 | 18 | 19 | 20 | 21 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-02/README.md: -------------------------------------------------------------------------------- 1 | # Add-a-line Bookmarks Read Me 2 | 3 | [Source Code ]( https://github.com/opentecture/mindmapping/tree/master/sandbox/opentecture-bookmarks/add-a-line-bookmarks ) 4 | 5 |
6 | 7 | Concept 8 | 9 | Basic bookmark manager 10 | 11 |
12 | 13 |
14 | 15 | To Do / Wish List 16 | 17 | * 2019-07-07 ~ Theo ~ Create tag chains usable to tie Mind Map elements 18 | * 2019-06-23 ~ Theo ~ Filter by multiple tags 19 | * 2019-06-23 ~ Theo ~ Filter by content 20 | * 2019-06-23 ~ Theo ~ Add tags to multiple bookmarks at same time 21 | * 2019-06-23 ~ Theo ~ Refresh memory after a deletion 22 | * 2019-06-23 ~ Theo ~ meta tags with description of entire project, copyright, license etc 23 | * 2019-06-03 ~ Theo ~ Save to and read from gists 24 | * 2019-06-03 ~ Theo ~ Remove dead links/ or retrieve version from Internet Archive 25 | 26 |
27 | 28 |
29 | 30 | Issues 31 | 32 | 33 |
34 | 35 |
36 | 37 | Change Log 38 | 39 | ### 2019-07-07 ~ Theo 40 | 41 | Add-a-line Bookmarks v0.5.02 42 | 43 | Content 44 | 45 | * F - BM.js: Add item numbers and date update 46 | * F - MET.js: first commit 47 | * F - AAL: Update popup text, add license and link 48 | 49 | 50 | Dealt with 51 | 52 | * 2019-06-23 ~ Theo ~ Adding comment broken? 53 | * 2019-06-23 ~ Theo ~ Add comments by url instead of bookmark id - or keep both? 54 | 55 | 56 | ### 2019-06-23 ~ Theo 57 | 58 | * Many fixes / looking even better / almost workable 59 | 60 | ### 2019-06-10 ~ Theo 61 | 62 | 63 | To Do dealt with 64 | 65 | * 2019-06-03 ~ Theo ~ Menus: add back the variety of displays: domain, tag etc 66 | * 2019-06-03 ~ Theo ~ File open 67 | * 2019-06-03 ~ Theo ~ Finish adding comments 68 | * 2019-06-03 ~ Theo ~ Tags: add trimming, sorting, removing duplicates 69 | * 2019-06-03 ~ Theo ~ add favicon of the site 70 | * 2019-06-03 ~ Theo ~ Add search and various sorts 71 | 72 | ### 2019-06-08 ~ Theo 73 | 74 | * F - BTG.js: Add bookmarks by tag 75 | * F - BDM.js: Add bookmarks by domain 76 | * R - AAL: refactor all 77 | 78 | ### 2019-06-03 ~ Theo 79 | 80 | * Added four modules or seven total or something 81 | 82 | I am really enjoying this little effort. Features are coming in thick and fast. 83 | 84 | ### 2019-06-01 ~ Theo 85 | 86 | * First commit 87 | 88 |
89 | 90 | *** 91 | 92 | #
93 | 94 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-02/js/bme-bookmarks-edit.js: -------------------------------------------------------------------------------- 1 | /* global */ 2 | /* jshint esversion: 6 */ 3 | /* jshint loopfunc: true */ 4 | 5 | 6 | BME = { 7 | 8 | "copyright": "Copyright 2019 pushMe-pullYou authors. MIT License", 9 | "date": "2019-07-06", 10 | "description": "Edit bookmark data above, then view and save your edits or delete bookmark", 11 | "version": "0.5.02-2bme", 12 | 13 | }; 14 | 15 | 16 | BME.getMenuBookmarkEdit = function() { 17 | 18 | //
19 | // 20 | const htm = 21 | ` 22 |
23 | 24 | Bookmark edit ~ BME Vv${ BME.version } ~ ${ BME.date } 25 | 26 |

${ BME.description }

27 | 28 |

29 | 30 | 31 | 32 | 33 | 34 | 35 | / 36 | 37 | 38 | 39 |

40 | 41 |

42 | 43 |

44 | 45 |
46 | 47 | 48 | `; 49 | 50 | return htm; 51 | 52 | }; 53 | 54 | 55 | BME.setTextareaJson = function() { 56 | 57 | const tags = `["${ BMinpTags.value.slice().replace( /,/g, '","') }"]`; 58 | const txt = 59 | `{ 60 | "url": "${ BMinpUrl.value }", 61 | "name": "${ BMinpName.value }", 62 | "dateAdd": "${ BMinpDateAdd.value }", 63 | "dateUpdate": "${ new Date().toISOString() }", 64 | "id": "${ BMinpId.value }", 65 | "type": "${ BMinpType.value }", 66 | "images": [ ${ BMinpImages.value } ], 67 | "favicon": "${ BMinpFavicon.value }", 68 | "tags": ${ tags }, 69 | "description": "${ BMtxtDescription.value }" 70 | }`; 71 | 72 | BMEtxtJson.value = txt; 73 | 74 | }; 75 | 76 | 77 | 78 | 79 | 80 | BME.setJsonTagSets = function() { 81 | 82 | const index = BM.lines.findIndex( line => line.includes( `\"${ BMinpId.value }\"` ) ); 83 | //console.log( 'index', index ); 84 | 85 | if ( BMEtxtJson.value === "" ) { alert( "First click and edit 'Set bookmark JSON'"); return; } 86 | 87 | const json = JSON.parse( BMEtxtJson.value ); 88 | const line = JSON.stringify( json ); 89 | //console.log( 'line', line ); 90 | 91 | if ( index >= 0 ) { 92 | 93 | BM.lines[ index ] = line; 94 | 95 | } else if ( json.url !== "" ) { 96 | 97 | BM.lines.push( line ); 98 | 99 | } else { 100 | 101 | BMtxtJson.value = 'Please add a URL'; 102 | 103 | return; 104 | 105 | } 106 | 107 | }; 108 | 109 | 110 | 111 | BME.setJsonDelete = function() { 112 | 113 | const index = BM.lines.findIndex( line => line.includes( `\"${ BMinpId.value }\"` ) ); 114 | //console.log( 'index', index ); 115 | 116 | BM.lines.splice( index, 1 ); 117 | 118 | BMEtxtJson.value = "Remember to 'Save edits to file'"; 119 | 120 | console.log( 'BM.lines delete', index, BM.lines.length ); 121 | 122 | }; -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-02/js/cor-core.js: -------------------------------------------------------------------------------- 1 | /* globals FOB */ 2 | /* jshint esversion: 6 */ 3 | /* jshint loopfunc: true */ 4 | 5 | 6 | const COR = { 7 | "copyright": "Copyright 2019 Opentecture authors. MIT License", 8 | "date": "2019-06-23", 9 | "description": "core - Contains local overrides", 10 | "helpFile": "cor-core/README.md", 11 | "version": "0.0.0-1cor", 12 | }; 13 | 14 | 15 | //THM.themeUrlStorage = 'addALineTheme'; // set for each instance in HTML file 16 | //THM.cssBasic = "https://pushme-pullyou.github.io/tootoo14/js-14-03/style.css"; 17 | //THM.backgroundColor = "#eed" 18 | 19 | FOB.urlDefaultFile = "../../bookmarks.json"; 20 | 21 | POP.license = "../../../../license" 22 | 23 | // For main menu header 24 | MNU.helpFile = "../../README.md"; 25 | 26 | MNU.description = `Basic bookmark manager and editor with tagging, descriptions and comments`; 27 | 28 | MNU.urlSourceCode = "https://github.com/opentecture/mindmapping/tree/master/sandbox/opentecture-bookmarks"; 29 | 30 | MNU.homeText = "opentecture"; 31 | MNU.homeTitle = "Building to a common, scalable standard creates new opportunities to design and create objects and spaces in a collaborative way."; 32 | MNU.homeUrl = "https://www.opentecture.com/"; 33 | 34 | MNU.repoText = "mindmapping"; 35 | MNU.repoTitle = "Mindmapping is a collection of basic plain-vanilla JavaScript scripts for idea management using GitHub pages, 3D and whatever else comes to mind"; 36 | MNU.repoUrl = "https://opentecture.github.io/mindmapping"; 37 | 38 | MNU.appText = "bookmarks"; 39 | MNU.appTitle = ""; //"Basic html content management script with sliding menu, css theme selection, Markdown to HTML, drag and drop file reading capability, access to frequently used pages and more"; 40 | MNU.appUrl = "https://opentecture.github.io/mindmapping/#sandbox/opentecture-bookmarks/README.md"; 41 | 42 | MNU.footerPopupUrl = "https://pushme-pullyou.github.io/tootoo14/"; 43 | MNU.footerTarget = "target=_blank"; 44 | MNU.footerIssues = "https://github.com/opentecture/mindmapping/issues"; 45 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-02/js/tga-tags-add.js: -------------------------------------------------------------------------------- 1 | /* global BM, BMinpTags, TGAdivTagsSelect */ 2 | /* jshint esversion: 6 */ 3 | /* jshint loopfunc: true */ 4 | 5 | 6 | const TGA = { 7 | 8 | "copyright": "Copyright 2019 pushMe-pullYou authors. MIT License", 9 | "date": "2019-06-02", 10 | "description": "Add curated (hopefully) tags to bookmarks", 11 | "version": "0.5.0-0", 12 | 13 | }; 14 | 15 | 16 | 17 | TGA.getMenuTagsAdd = function() { 18 | 19 | const htm = 20 | ` 21 |
22 | 23 | Tags Add ~ TGA V ${ TGA.version } ~ ${ TGA.date } 24 | 25 |

${ TGA.description }

26 | 27 |
28 | 29 |
30 | `; 31 | 32 | return htm; 33 | 34 | }; 35 | 36 | 37 | 38 | TGA.onToggle = function() { 39 | 40 | 41 | const tagSets = BM.lines.filter( line => line.includes( "tagset" ) ); 42 | //console.log( '', tagSets ); 43 | 44 | let htm = ""; 45 | 46 | for ( let tagSet of tagSets ) { 47 | 48 | const json = JSON.parse( tagSet ); 49 | 50 | const options = json.tags.map( tag => `` ).join(); 51 | //console.log( 'options ', options ); 52 | 53 | htm += 54 | `

55 | 56 | ${json.name }
57 | 58 | 59 |

 `; 60 | 61 | } 62 | 63 | TGAdivTagsSelect.innerHTML = htm; 64 | 65 | }; 66 | 67 | 68 | 69 | TGA.addTag = function( select ) { 70 | 71 | const comma = BMinpTags.value === "" || BMinpTags.value.endsWith( ",") ? "" : ","; 72 | 73 | BMinpTags.value += comma + select.value; 74 | 75 | }; -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-02/popup.md: -------------------------------------------------------------------------------- 1 | ### Opentecture online resources 2 | 3 | Hello, world! This script is designed to help you explore web sites that embrace the Opentecture mission: A collection of notes on collaborative systems and modular architecture. And it is still a work-in-progress at an early stage of development. 4 | 5 | Click anywhere outside this popup to close this popup. 6 | 7 | Press Control-Shift-J | Command-Option-J to see if the JavaScript console reports any errors. 8 | 9 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-02/readme.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Open Index or Markdown 6 | 7 | 8 | 9 | 10 | 18 | 19 | 20 | 21 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-03/README.md: -------------------------------------------------------------------------------- 1 | # Add-a-line Bookmarks Read Me 2 | 3 | [Source Code ]( https://github.com/opentecture/mindmapping/tree/master/sandbox/opentecture-bookmarks/add-a-line-bookmarks ) 4 | 5 |
6 | 7 | Concept 8 | 9 | Basic bookmark manager 10 | 11 |
12 | 13 |
14 | 15 | To Do / Wish List 16 | 17 | * 2019-07-07 ~ Theo ~ Create tag chains usable to tie Mind Map elements 18 | * 2019-06-23 ~ Theo ~ Filter by multiple tags 19 | * 2019-06-23 ~ Theo ~ Filter by content 20 | * 2019-06-23 ~ Theo ~ Add tags to multiple bookmarks at same time 21 | * 2019-06-23 ~ Theo ~ Refresh memory after a deletion 22 | * 2019-06-03 ~ Theo ~ Save to and read from gists 23 | 24 | ## onLoad 25 | 26 | * 2019-07-28 ~ Theo ~ filter out deprecated, off-topic etc using local storage 27 | * 2019-07-28 ~ Theo ~ Set menu type using local stor age 28 | 29 | ### Menu 30 | 31 | * 2019-07-28 ~ Theo ~ List links by date of entry/update 32 | * 2019-07-28 ~ Theo ~ Bookmarks in file order 33 | 34 | 35 |
36 | 37 |
38 | 39 | Issues 40 | 41 | 42 |
43 | 44 |
45 | 46 | Change Log 47 | 48 | ### 2019-07-28 ~ Theo 49 | 50 | Add-a-line Bookmarks v0.5.03 51 | 52 | * First commit 53 | * Getting simpler 54 | 55 | Dealt with 56 | 57 | * 2019-06-23 ~ Theo ~ meta tags with description of entire project, copyright, license etc 58 | 59 |
60 | 61 | *** 62 | 63 | #
64 | 65 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-03/js/bme-bookmarks-edit.js: -------------------------------------------------------------------------------- 1 | /* global */ 2 | /* jshint esversion: 6 */ 3 | /* jshint loopfunc: true */ 4 | 5 | 6 | BME = { 7 | 8 | "copyright": "Copyright 2019 pushMe-pullYou authors. MIT License", 9 | "date": "2019-07-06", 10 | "description": "Edit bookmark data above, then view and save your edits or delete bookmark", 11 | "version": "0.5.02-2bme", 12 | 13 | }; 14 | 15 | 16 | BME.getMenuBookmarkEdit = function() { 17 | 18 | //
19 | // 20 | const htm = 21 | ` 22 |
23 | 24 | Bookmark edit ~ BME Vv${ BME.version } ~ ${ BME.date } 25 | 26 |

${ BME.description }

27 | 28 |

29 | 30 | 31 | 32 | 33 | 34 | 35 | / 36 | 37 | 38 | 39 |

40 | 41 |

42 | 43 |

44 | 45 |
46 | 47 | 48 | `; 49 | 50 | return htm; 51 | 52 | }; 53 | 54 | 55 | BME.setTextareaJson = function() { 56 | 57 | const tags = `["${ BMinpTags.value.slice().replace( /,/g, '","') }"]`; 58 | const txt = 59 | `{ 60 | "url": "${ BMinpUrl.value }", 61 | "name": "${ BMinpName.value }", 62 | "dateAdd": "${ BMinpDateAdd.value }", 63 | "dateUpdate": "${ new Date().toISOString() }", 64 | "id": "${ BMinpId.value }", 65 | "type": "${ BMinpType.value }", 66 | "images": [ ${ BMinpImages.value } ], 67 | "favicon": "${ BMinpFavicon.value }", 68 | "tags": ${ tags }, 69 | "description": "${ BMtxtDescription.value }" 70 | }`; 71 | 72 | BMEtxtJson.value = txt; 73 | 74 | }; 75 | 76 | 77 | 78 | 79 | 80 | BME.setJsonTagSets = function() { 81 | 82 | const index = BM.lines.findIndex( line => line.includes( `\"${ BMinpId.value }\"` ) ); 83 | //console.log( 'index', index ); 84 | 85 | if ( BMEtxtJson.value === "" ) { alert( "First click and edit 'Set bookmark JSON'"); return; } 86 | 87 | const json = JSON.parse( BMEtxtJson.value ); 88 | const line = JSON.stringify( json ); 89 | //console.log( 'line', line ); 90 | 91 | if ( index >= 0 ) { 92 | 93 | BM.lines[ index ] = line; 94 | 95 | } else if ( json.url !== "" ) { 96 | 97 | BM.lines.push( line ); 98 | 99 | } else { 100 | 101 | BMtxtJson.value = 'Please add a URL'; 102 | 103 | return; 104 | 105 | } 106 | 107 | }; 108 | 109 | 110 | 111 | BME.setJsonDelete = function() { 112 | 113 | const index = BM.lines.findIndex( line => line.includes( `\"${ BMinpId.value }\"` ) ); 114 | //console.log( 'index', index ); 115 | 116 | BM.lines.splice( index, 1 ); 117 | 118 | BMEtxtJson.value = "Remember to 'Save edits to file'"; 119 | 120 | console.log( 'BM.lines delete', index, BM.lines.length ); 121 | 122 | }; -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-03/js/cor-core.js: -------------------------------------------------------------------------------- 1 | /* globals FOB */ 2 | /* jshint esversion: 6 */ 3 | /* jshint loopfunc: true */ 4 | 5 | 6 | const COR = { 7 | "copyright": "Copyright 2019 Opentecture authors. MIT License", 8 | "date": "2019-06-23", 9 | "description": "core - Contains local overrides", 10 | "helpFile": "cor-core/README.md", 11 | "version": "0.0.0-1cor", 12 | }; 13 | 14 | 15 | //THM.themeUrlStorage = 'addALineTheme'; // set for each instance in HTML file 16 | //THM.cssBasic = "https://pushme-pullyou.github.io/tootoo14/js-14-03/style.css"; 17 | //THM.backgroundColor = "#eed" 18 | 19 | FOB.urlDefaultFile = "../../bookmarks.json"; 20 | 21 | POP.license = "../../../../license" 22 | 23 | // For main menu header 24 | MNU.helpFile = "../../README.md"; 25 | 26 | MNU.description = `Basic bookmark manager and editor with tagging, descriptions and comments`; 27 | 28 | MNU.urlSourceCode = "https://github.com/opentecture/mindmapping/tree/master/sandbox/opentecture-bookmarks"; 29 | 30 | MNU.homeText = "opentecture"; 31 | MNU.homeTitle = "Building to a common, scalable standard creates new opportunities to design and create objects and spaces in a collaborative way."; 32 | MNU.homeUrl = "https://www.opentecture.com/"; 33 | 34 | MNU.repoText = "mindmapping"; 35 | MNU.repoTitle = "Mindmapping is a collection of basic plain-vanilla JavaScript scripts for idea management using GitHub pages, 3D and whatever else comes to mind"; 36 | MNU.repoUrl = "https://opentecture.github.io/mindmapping"; 37 | 38 | MNU.appText = "bookmarks"; 39 | MNU.appTitle = ""; //"Basic html content management script with sliding menu, css theme selection, Markdown to HTML, drag and drop file reading capability, access to frequently used pages and more"; 40 | MNU.appUrl = "https://opentecture.github.io/mindmapping/#sandbox/opentecture-bookmarks/README.md"; 41 | 42 | MNU.footerPopupUrl = "https://pushme-pullyou.github.io/tootoo14/"; 43 | MNU.footerTarget = "target=_blank"; 44 | MNU.footerIssues = "https://github.com/opentecture/mindmapping/issues"; 45 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-03/js/mfo-menu-file-order.js: -------------------------------------------------------------------------------- 1 | /* global BM, MFOdet, MFOdivBookmarksByTag */ 2 | // jshint esversion: 6 3 | // jshint loopfunc: true 4 | 5 | const MFO = { 6 | 7 | copyright: "Copyright 2019 Opentecture authors. ", 8 | date: "2019-07-28", 9 | description: "Buttons for every line of JSON in the file", 10 | license: "MIT License", 11 | version: "0.5.03-0mfo", 12 | 13 | }; 14 | 15 | 16 | MFO.getMenuJsonLines = function() { 17 | 18 | const htm = 19 | ` 20 |
21 | 22 | All items by JSON line 23 | 24 |

${ MFO.description }

25 | 30 |
31 | 32 |
33 | 34 |
35 | `; 36 | 37 | return htm; 38 | 39 | }; 40 | 41 | 42 | 43 | MFO.setMenuJsonLines = function( bookmarks = BM.jsonLines ){ 44 | 45 | 46 | if( MFOdet.open === false ) return; 47 | 48 | let markHtm = `

${ bookmarks.length } links

`; 49 | 50 | for ( let bookmark of bookmarks) { 51 | 52 | if ( !bookmark.url || !bookmark.type === "url" ) { continue; } 53 | 54 | const index = bookmarks.indexOf( bookmark ); 55 | 56 | markHtm += 57 | ` 58 |
59 | 60 | 61 |
62 | `; 63 | 64 | } 65 | 66 | MFOdivJsonLines.innerHTML = markHtm; 67 | 68 | BM.setBookmarks( bookmarks ); 69 | 70 | }; 71 | 72 | 73 | 74 | MFO.filterBookmarks = function ( input ) { 75 | 76 | const str = input.value; 77 | //console.log( 'str', str ); 78 | const a = document.createElement( 'a' ); 79 | 80 | MFO.bookmarks = []; 81 | 82 | if ( str === "" ) { 83 | 84 | for ( let line of BM.lines ) { 85 | //console.log( 'line', line ); 86 | 87 | //if ( line.slice( 0, 1 ) !== "{" ) { continue; } 88 | 89 | const jsonl = JSON.parse( line ); 90 | //console.log( 'jsonl', jsonl ); 91 | 92 | if ( jsonl.type === "url" ) { MFO.bookmarks.push( jsonl ); } 93 | 94 | } 95 | 96 | } else { 97 | 98 | for ( let line of BM.lines ) { 99 | 100 | //if ( line.slice( 0, 1 ) !== "{" ) { continue; } 101 | //console.log( 'line', line ); 102 | 103 | const jsonl = JSON.parse( line ); 104 | //console.log( 'jsonl', jsonl.url ); 105 | 106 | if ( jsonl.url ) { 107 | 108 | a.href = jsonl.url; 109 | const site = a.hostname; 110 | //console.log( 'site', site ); 111 | 112 | if ( site.includes( str ) ) { MFO.bookmarks.push( jsonl ); } 113 | 114 | } 115 | 116 | } 117 | 118 | } 119 | 120 | MFO.setMenuItemsByUrl( MFO.bookmarks ); 121 | 122 | }; -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-03/js/mjl-menu-json-lines.js: -------------------------------------------------------------------------------- 1 | /* global BM, MJLdet, MJLdivBookmarksByTag */ 2 | // jshint esversion: 6 3 | // jshint loopfunc: true 4 | 5 | const MJL = { 6 | 7 | copyright: "Copyright 2019 Opentecture authors. ", 8 | date: "2019-07-28", 9 | description: "Display every line of JSON in the file", 10 | license: "MIT License", 11 | version: "0.5.03-0mjl", 12 | 13 | }; 14 | 15 | 16 | MJL.getMenuJsonLines = function() { 17 | 18 | const htm = 19 | ` 20 |
21 | 22 | Button for every JSON line in file MJL 23 | 24 |

${ MJL.description }

25 | 26 |

27 | Search text in tiles: 28 |

29 | 30 |
31 | 32 |
33 | 34 |
35 | `; 36 | 37 | return htm; 38 | 39 | }; 40 | 41 | 42 | 43 | MJL.setMenuJsonLines = function( bookmarks = BM.jsonLines ){ 44 | 45 | 46 | if( MJLdet.open === false ) return; 47 | 48 | let markHtm = `

${ bookmarks.length } links

`; 49 | 50 | for ( let mark of bookmarks) { 51 | 52 | const index = BM.jsonLines.indexOf( mark ); 53 | 54 | markHtm += 55 | ` 56 |
57 | 58 | 59 |
60 | `; 61 | 62 | } 63 | 64 | MJLdivJsonLines.innerHTML = markHtm; 65 | 66 | BM.setBookmarks( bookmarks ); 67 | 68 | }; 69 | 70 | 71 | 72 | MJL.filterBookmarks = function ( input ) { 73 | 74 | const str = input.value.toLowerCase(); 75 | 76 | MJL.bookmarks = []; 77 | 78 | if ( str === "" ) { 79 | 80 | for ( let line of BM.lines ) { 81 | 82 | const jsonl = JSON.parse( line ); 83 | 84 | if ( jsonl.type === "url" ) { MJL.bookmarks.push( jsonl ); } 85 | 86 | } 87 | 88 | } else { 89 | 90 | MJL.bookmarks = BM.lines.map( line => JSON.parse( line ) ) 91 | .filter( jsonl => jsonl.name && jsonl.name.toLowerCase().includes( str ) ); 92 | 93 | } 94 | 95 | MJL.setMenuJsonLines( MJL.bookmarks ); 96 | 97 | }; -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-03/js/tga-tags-add.js: -------------------------------------------------------------------------------- 1 | /* global BM, BMinpTags, TGAdivTagsSelect */ 2 | /* jshint esversion: 6 */ 3 | /* jshint loopfunc: true */ 4 | 5 | 6 | const TGA = { 7 | 8 | "copyright": "Copyright 2019 pushMe-pullYou authors. MIT License", 9 | "date": "2019-06-02", 10 | "description": "Add curated (hopefully) tags to bookmarks", 11 | "version": "0.5.0-0", 12 | 13 | }; 14 | 15 | 16 | 17 | TGA.getMenuTagsAdd = function() { 18 | 19 | const htm = 20 | ` 21 |
22 | 23 | Tags Add ~ TGA V ${ TGA.version } ~ ${ TGA.date } 24 | 25 |

${ TGA.description }

26 | 27 |
28 | 29 |
30 | `; 31 | 32 | return htm; 33 | 34 | }; 35 | 36 | 37 | 38 | TGA.onToggle = function() { 39 | 40 | 41 | const tagSets = BM.jsonLines.filter( line => line.type === "tagset" ); 42 | //console.log( '', tagSets ); 43 | 44 | let htm = ""; 45 | 46 | for ( let tagSet of tagSets ) { 47 | 48 | //const json = JSON.parse( tagSet ); 49 | 50 | const options = tagSet.tags.map( tag => `` ).join(); 51 | //console.log( 'options ', options ); 52 | 53 | htm += 54 | `

55 | 56 | ${tagSet.name }
57 | 58 | 59 |

 `; 60 | 61 | } 62 | 63 | TGAdivTagsSelect.innerHTML = htm; 64 | 65 | }; 66 | 67 | 68 | 69 | TGA.addTag = function( select ) { 70 | 71 | const comma = BMinpTags.value === "" || BMinpTags.value.endsWith( ",") ? "" : ","; 72 | 73 | BMinpTags.value += comma + select.value; 74 | 75 | }; -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-03/popup.md: -------------------------------------------------------------------------------- 1 | ### Opentecture online resources 2 | 3 | Hello, world! This script is designed to help you explore web sites that embrace the Opentecture mission: A collection of notes on collaborative systems and modular architecture. And it is still a work-in-progress at an early stage of development. 4 | 5 | Click anywhere outside this popup to close this popup. 6 | 7 | Press Control-Shift-J | Command-Option-J to see if the JavaScript console reports any errors. 8 | 9 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-03/readme.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Open Index or Markdown 6 | 7 | 8 | 9 | 10 | 18 | 19 | 20 | 21 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-04/README.md: -------------------------------------------------------------------------------- 1 | # Add-a-line Bookmarks Read Me 2 | 3 | [Source Code ]( https://github.com/opentecture/mindmapping/tree/master/sandbox/opentecture-bookmarks/add-a-line-bookmarks ) 4 | 5 |
6 | 7 | Concept 8 | 9 | Basic bookmark manager 10 | 11 |
12 | 13 |
14 | 15 | To Do / Wish List 16 | 17 | * 2019-07-07 ~ Theo ~ Create tag chains usable to tie Mind Map elements 18 | * 2019-06-23 ~ Theo ~ Filter by multiple tags 19 | * 2019-06-23 ~ Theo ~ Filter by content 20 | * 2019-06-23 ~ Theo ~ Add tags to multiple bookmarks at same time 21 | * 2019-06-23 ~ Theo ~ Refresh memory after a deletion 22 | * 2019-06-03 ~ Theo ~ Save to and read from gists 23 | 24 | ## onLoad 25 | 26 | * 2019-07-28 ~ Theo ~ filter out deprecated, off-topic etc using local storage 27 | * 2019-07-28 ~ Theo ~ Set menu type using local stor age 28 | 29 | ### Menu 30 | 31 | * 2019-07-28 ~ Theo ~ List links by date of entry/update 32 | * 2019-07-28 ~ Theo ~ Bookmarks in file order 33 | 34 | 35 |
36 | 37 |
38 | 39 | Issues 40 | 41 | 42 |
43 | 44 |
45 | 46 | Change Log 47 | 48 | ### 2019-07-28 ~ Theo 49 | 50 | Add-a-line Bookmarks v0.5.03 51 | 52 | * First commit 53 | * Getting simpler 54 | 55 | Dealt with 56 | 57 | * 2019-06-23 ~ Theo ~ meta tags with description of entire project, copyright, license etc 58 | 59 |
60 | 61 | *** 62 | 63 | #
64 | 65 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-04/js-menu/mfo-menu-file-order.js: -------------------------------------------------------------------------------- 1 | /* global BM, MFOdet, MFOdivBookmarksByTag */ 2 | // jshint esversion: 6 3 | // jshint loopfunc: true 4 | 5 | const MFO = { 6 | 7 | copyright: "Copyright 2019 Opentecture authors. ", 8 | date: "2019-07-28", 9 | description: "Buttons for every line of JSON in the file", 10 | license: "MIT License", 11 | version: "0.5.03-0mfo", 12 | 13 | }; 14 | 15 | 16 | MFO.getMenuFileOrder= function() { 17 | 18 | const htm = 19 | ` 20 |
21 | 22 | Filter bookmarks in file order 23 | 24 |

${ MFO.description }

25 | 30 |
31 | 32 |
33 | 34 |
35 | `; 36 | 37 | return htm; 38 | 39 | }; 40 | 41 | 42 | 43 | MFO.setMenuJsonLines = function( bookmarks = BOP.jsonLines ){ 44 | 45 | 46 | if ( MFOdet.open === false ) return; 47 | 48 | let markHtm = `

${ BOP.bookmarks.length } links

`; 49 | 50 | for ( let bookmark of bookmarks) { 51 | 52 | if ( !bookmark.url || !bookmark.type === "url" ) { continue; } 53 | 54 | const index = bookmarks.indexOf( bookmark ); 55 | 56 | markHtm += 57 | ` 58 |
59 | 60 | 61 |
62 | `; 63 | 64 | } 65 | 66 | MFOdivJsonLines.innerHTML = markHtm; 67 | 68 | //BM.setBookmarks( bookmarks ); 69 | 70 | }; 71 | 72 | 73 | 74 | MFO.filterBookmarks = function ( input ) { 75 | 76 | const str = input.value; 77 | //console.log( 'str', str ); 78 | const a = document.createElement( 'a' ); 79 | 80 | MFO.bookmarks = []; 81 | 82 | if ( str === "" ) { 83 | 84 | for ( let line of BM.lines ) { 85 | //console.log( 'line', line ); 86 | 87 | //if ( line.slice( 0, 1 ) !== "{" ) { continue; } 88 | 89 | const jsonl = JSON.parse( line ); 90 | //console.log( 'jsonl', jsonl ); 91 | 92 | if ( jsonl.type === "url" ) { MFO.bookmarks.push( jsonl ); } 93 | 94 | } 95 | 96 | } else { 97 | 98 | for ( let line of BM.lines ) { 99 | 100 | //if ( line.slice( 0, 1 ) !== "{" ) { continue; } 101 | //console.log( 'line', line ); 102 | 103 | const jsonl = JSON.parse( line ); 104 | //console.log( 'jsonl', jsonl.url ); 105 | 106 | if ( jsonl.url ) { 107 | 108 | a.href = jsonl.url; 109 | const site = a.hostname; 110 | //console.log( 'site', site ); 111 | 112 | if ( site.includes( str ) ) { MFO.bookmarks.push( jsonl ); } 113 | 114 | } 115 | 116 | } 117 | 118 | } 119 | 120 | MFO.setMenuItemsByUrl( MFO.bookmarks ); 121 | 122 | }; -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-04/js-menu/mjl-menu-json-lines.js: -------------------------------------------------------------------------------- 1 | /* global BM, MJLdet, MJLdivBookmarksByTag */ 2 | // jshint esversion: 6 3 | // jshint loopfunc: true 4 | 5 | const MJL = { 6 | 7 | copyright: "Copyright 2019 Opentecture authors. ", 8 | date: "2019-07-28", 9 | description: "Display every line of JSON in the file", 10 | license: "MIT License", 11 | version: "0.5.03-0mjl", 12 | 13 | }; 14 | 15 | 16 | MJL.getMenuJsonLines = function() { 17 | 18 | const htm = 19 | ` 20 |
21 | 22 | Every JSON line in file MJL 23 | 24 |

${ MJL.description }

25 | 26 |

27 | Search text in tiles: 28 |

29 | 30 |
31 | 32 |
33 | 34 |
35 | `; 36 | 37 | return htm; 38 | 39 | }; 40 | 41 | 42 | 43 | MJL.setMenuJsonLines = function( bookmarks = BOP.jsonLines ){ 44 | 45 | if ( MJLdet.open === false ) return; 46 | 47 | let markHtm = `

${ bookmarks.length } links

`; 48 | 49 | for ( let mark of bookmarks) { 50 | 51 | const index = BOP.jsonLines.indexOf( mark ); 52 | 53 | markHtm += 54 | ` 55 |
56 | 57 | 58 |
59 | `; 60 | 61 | } 62 | 63 | MJLdivJsonLines.innerHTML = markHtm; 64 | 65 | //BOP.setBookmarks( bookmarks ); 66 | 67 | }; 68 | 69 | 70 | 71 | MJL.filterBookmarks = function ( input ) { 72 | 73 | const str = input.value.toLowerCase(); 74 | 75 | MJL.bookmarks = []; 76 | 77 | if ( str === "" ) { 78 | 79 | for ( let line of BOP.lines ) { 80 | 81 | const jsonl = JSON.parse( line ); 82 | 83 | if ( jsonl.type === "url" ) { MJL.bookmarks.push( jsonl ); } 84 | 85 | } 86 | 87 | } else { 88 | 89 | MJL.bookmarks = BOP.lines.map( line => JSON.parse( line ) ) 90 | .filter( jsonl => jsonl.name && jsonl.name.toLowerCase().includes( str ) ); 91 | 92 | } 93 | 94 | MJL.setMenuJsonLines( MJL.bookmarks ); 95 | 96 | }; -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-04/js/bed-bookmark-edit-dialog.js: -------------------------------------------------------------------------------- 1 | /* global BOP */ 2 | // jshint esversion: 6 3 | // jshint loopfunc: true 4 | 5 | 6 | const BED = { 7 | 8 | "copyright": "Copyright 2019 Opentecture authors. MIT License", 9 | "date": "2019-08-04", 10 | "description": "Display data of bookmark selected from left menu or drag & drop a link into this box", 11 | "version": "0.5.04-0bed", 12 | 13 | }; 14 | 15 | 16 | 17 | BED.setTargetToEditDialog = function( index ) { 18 | 19 | BOP.target.innerHTML = BED.getBookmarksData(); 20 | 21 | const bookmark = BED.bookmark = BOP.bookmarks[ index ]; 22 | //console.log( 'bookmark', bookmark ); 23 | 24 | BEDinpUrl.value = bookmark.url || ""; 25 | BEDinpName.value = bookmark.name; 26 | BEDinpDateAdd.value = bookmark.dateAdd; 27 | BEDinpDateUpdate.value = bookmark.dateUpdate; 28 | BEDinpId.value = bookmark.id; 29 | BEDinpType.value = bookmark.type; 30 | BEDinpImages.value = bookmark.images || ""; 31 | BEDinpFavicon.value = bookmark.favicon || ""; 32 | BEDinpTags.value = bookmark.tags; 33 | BEDtxtDescription.value = bookmark.description; 34 | 35 | BEDdivUrl.innerHTML = bookmark.favicon ? 36 | `` : ""; 37 | 38 | const comments = BOP.comments.filter( line => { 39 | 40 | return line.bookmarkId === bookmark.id && line.type === "comment" 41 | 42 | } ); 43 | 44 | if ( comments.length ) { 45 | 46 | const comment = comments[ 0 ]; 47 | //console.log( 'comment', comment ); 48 | 49 | BEDtxtComment.value = 50 | `comment: ${ comment.text }\n\ntags: ${ comment.tags }`; 51 | 52 | } else { 53 | 54 | BEDtxtComment.value = ""; 55 | 56 | } 57 | 58 | }; 59 | 60 | 61 | 62 | BED.getBookmarksData = function() { 63 | 64 | const htm = 65 | ` 66 |
67 | 68 | Bookmark ~ BED V ${ BED.version } ~ ${ BED.date } 69 | 70 |

71 | 72 |
73 | 74 |
url
75 | 76 |
name
77 | 78 |
79 | 80 |
81 | 82 |
date add
83 | 84 |
update
85 | 86 |
id
87 | 88 |
type
89 | 90 |
91 | 92 |
93 | 94 |
images
95 | 96 |
favicon
97 | 98 |
tags
99 | 100 |
description
101 | 102 |
comment
103 | 104 |
105 | 106 |
107 | `; 108 | 109 | return htm; 110 | 111 | }; -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-04/js/bop-bookmarks-onload-parse.js: -------------------------------------------------------------------------------- 1 | /* global FOB */ 2 | // jshint esversion: 6 3 | // jshint loopfunc: true 4 | 5 | 6 | const BOP = { 7 | 8 | "copyright": "Copyright 2019 Opentecture authors. MIT License", 9 | "date": "2019-08-04", 10 | "description": "Display data of bookmark selected from left menu or drag & drop a link into this box", 11 | "version": "0.5.04-0bop", 12 | 13 | }; 14 | 15 | 16 | 17 | BOP.onLoadParse = function() { 18 | 19 | BOP.target = BOP.target || divContents; 20 | 21 | BOP.jsonLines = FOB.text.split(/\r\n|\n/) 22 | .filter( line => line.slice( 0, 1 ) === "{" ) 23 | .map( line => JSON.parse( line ) ); 24 | 25 | BOP.metaTags = BOP.jsonLines.filter( jsonl => jsonl.type === "meta" ); 26 | 27 | BOP.comments = BOP.jsonLines.filter( jsonl => jsonl.type === "comment" ); 28 | 29 | BOP.bookmarks = BOP.jsonLines.filter( jsonl => jsonl.type === "url" ); 30 | 31 | BOP.setBookmarks(); 32 | 33 | }; 34 | 35 | 36 | 37 | BOP.setBookmarks = function ( bookmarks = BOP.bookmarks ) { 38 | 39 | const a = document.createElement( 'a' ); 40 | const subdomains = ["www.", "m.", "en." ]; 41 | 42 | const title = BOP.metaTags.find( meta => meta.tags === "title" ).text; 43 | const subtitle = BOP.metaTags.find( meta => meta.tags === "subtitle" ).text; 44 | const copyright = BOP.metaTags.find( meta => meta.tags === "copyright" ).text || "copyright"; 45 | const license = BOP.metaTags.find( meta => meta.tags === "license" ).text || "license"; 46 | 47 | let htm = 48 | `

${ title }

49 |

${ subtitle }. ${copyright }. ${ license }.

`; 50 | 51 | let count = 1; 52 | bookmarks.forEach( bookmark => { 53 | 54 | a.href = bookmark.url; 55 | let site = a.hostname; 56 | 57 | const subdomain = subdomains.filter( bit => site.startsWith( bit ) === true ); 58 | //console.log( 'subdomain', subdomain ); 59 | 60 | site = site.replace ( subdomain, "" ); 61 | //console.log( 'site', site ); 62 | 63 | const comment = BOP.comments.find( comment => comment.bookmarkId === bookmark.id ) || ""; 64 | //console.log( 'comment', comment ); 65 | 66 | const index = BOP.jsonLines.findIndex( line => line.id === bookmark.id ); 67 | 68 | htm += 69 | `

70 | ${ count++ } 71 | 72 | ${ bookmark.name } - ${ site } 73 |
74 | tags: ${ bookmark.tags } 75 | - added: ${ bookmark.dateAdd.slice( 0, 10 ) } 76 | - update: ${ bookmark.dateUpdate.slice( 0, 10 ) } 77 |
78 | ${ bookmark.description.startsWith ("No description" ) ? "" : bookmark.description } 79 |

80 | ${ comment.text ? ( "comment: " + comment.text + " / tags: " + comment.tags ) : "" }

81 |
82 |

`; 83 | 84 | } ); 85 | 86 | BOP.target.innerHTML = htm; 87 | 88 | }; -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-04/js/cor-core.js: -------------------------------------------------------------------------------- 1 | /* globals FOB */ 2 | /* jshint esversion: 6 */ 3 | /* jshint loopfunc: true */ 4 | 5 | 6 | const COR = { 7 | "copyright": "Copyright 2019 Opentecture authors. MIT License", 8 | "date": "2019-06-23", 9 | "description": "core - Contains local overrides", 10 | "helpFile": "cor-core/README.md", 11 | "version": "0.0.0-1cor", 12 | }; 13 | 14 | 15 | //THM.themeUrlStorage = 'addALineTheme'; // set for each instance in HTML file 16 | //THM.cssBasic = "https://pushme-pullyou.github.io/tootoo14/js-14-03/style.css"; 17 | //THM.backgroundColor = "#eed" 18 | 19 | FOB.urlDefaultFile = "../../bookmarks.json"; 20 | 21 | POP.license = "../../../../license" 22 | 23 | // For main menu header 24 | MNU.helpFile = "../../README.md"; 25 | 26 | MNU.description = `Basic bookmark manager and editor with tagging, descriptions and comments`; 27 | 28 | MNU.urlSourceCode = "https://github.com/opentecture/mindmapping/tree/master/sandbox/opentecture-bookmarks"; 29 | 30 | MNU.homeText = "opentecture"; 31 | MNU.homeTitle = "Building to a common, scalable standard creates new opportunities to design and create objects and spaces in a collaborative way."; 32 | MNU.homeUrl = "https://www.opentecture.com/"; 33 | 34 | MNU.repoText = "mindmapping"; 35 | MNU.repoTitle = "Mindmapping is a collection of basic plain-vanilla JavaScript scripts for idea management using GitHub pages, 3D and whatever else comes to mind"; 36 | MNU.repoUrl = "https://opentecture.github.io/mindmapping"; 37 | 38 | MNU.appText = "bookmarks"; 39 | MNU.appTitle = ""; //"Basic html content management script with sliding menu, css theme selection, Markdown to HTML, drag and drop file reading capability, access to frequently used pages and more"; 40 | MNU.appUrl = "https://opentecture.github.io/mindmapping/#sandbox/opentecture-bookmarks/README.md"; 41 | 42 | MNU.footerPopupUrl = "https://pushme-pullyou.github.io/tootoo14/"; 43 | MNU.footerTarget = "target=_blank"; 44 | MNU.footerIssues = "https://github.com/opentecture/mindmapping/issues"; 45 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-04/popup.md: -------------------------------------------------------------------------------- 1 | ### Opentecture online resources 2 | 3 | Hello, world! This script is designed to help you explore web sites that embrace the Opentecture mission: A collection of notes on collaborative systems and modular architecture. And it is still a work-in-progress at an early stage of development. 4 | 5 | Click anywhere outside this popup to close this popup. 6 | 7 | Press Control-Shift-J | Command-Option-J to see if the JavaScript console reports any errors. 8 | 9 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-05/README.md: -------------------------------------------------------------------------------- 1 | # Add-a-line Bookmarks Read Me 2 | 3 | [Source Code ]( https://github.com/opentecture/mindmapping/tree/master/sandbox/opentecture-bookmarks/add-a-line-bookmarks ) 4 | 5 |
6 | 7 | Concept 8 | 9 | Basic bookmark manager and editor with tagging, descriptions and comments 10 | 11 |
12 | 13 |
14 | 15 | To Do / Wish List 16 | 17 | ### Popup 18 | 19 | * 2019-08-11 ~ Theo ~ Details about items visible at load time 20 | * 2019-08-11 ~ Theo ~ Move down below title 21 | 22 | 23 | ### Main contents 24 | 25 | * 2019-08-11 ~ Theo ~ Add images 26 | 27 | ### Main edit page 28 | 29 | * 2019-08-11 ~ Theo ~ Nicer CSS 30 | 31 | ### Json file 32 | 33 | * 2019-08-11 ~ Theo ~ Comments for every entry 34 | * 2019-08-11 ~ Theo ~ Excellent set of tags 35 | * 2019-08-11 ~ Theo ~ Every entry well-tagged 36 | 37 | 38 | ### Tags 39 | 40 | * 2019-08-11 ~ Theo ~ Filter by tags menu subdivided similar to edit tag sets 41 | * 2019-07-07 ~ Theo ~ Create tag chains usable to tie or link as Mind Map elements 42 | * 2019-06-23 ~ Theo ~ Filter by multiple tags 43 | * 2019-06-23 ~ Theo ~ Add tags to multiple bookmarks at same time 44 | 45 | ### File handling 46 | 47 | * 2019-08-11 ~ Theo ~ Update json lines data with each edit 48 | * 2019-06-23 ~ Theo ~ Refresh memory after a deletion 49 | * 2019-06-03 ~ Theo ~ Save to and read from gists 50 | 51 | ### onLoad 52 | 53 | * 2019-07-28 ~ Theo ~ Set menu type using local storage 54 | 55 | ### Menu 56 | 57 | * 2019-08-11 ~ Theo ~ Add notes about item colors 58 | 59 | 60 | 61 | 62 |
63 | 64 |
65 | 66 | Issues 67 | 68 | 69 |
70 | 71 |
72 | 73 | Change Log 74 | 75 | ### 2019-08-24 ~ Theo 76 | 77 | Many updates bookmarks.json 78 | 79 | * Adding tags 80 | * Updating tag sets 81 | * Adding comments 82 | 83 | ### 2019-08-11 ~ Theo 84 | 85 | Added 86 | 87 | * Saving in general working OK 88 | * Saving duplicate tags 89 | * Saving tagSets clean ups 90 | * Colored tags in main window 91 | 92 | Dealt with 93 | 94 | * 2019-06-23 ~ Theo ~ Filter by content 95 | * 2019-07-28 ~ Theo ~ filter out deprecated, off-topic etc using local storage 96 | * 2019-07-28 ~ Theo ~ List links by date of entry/update 97 | * 2019-07-28 ~ Theo ~ Bookmarks in file order 98 | 99 | 100 | ### 2019-07-28 ~ Theo 101 | 102 | Add-a-line Bookmarks v0.5.03 103 | 104 | * First commit 105 | * Getting simpler 106 | 107 | Dealt with 108 | 109 | * 2019-06-23 ~ Theo ~ meta tags with description of entire project, copyright, license etc 110 | 111 |
112 | 113 | *** 114 | 115 | #
116 | 117 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-05/js-menu/mdu-menu-duplicates.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | /* global BM, MDUdet, MDUdivBookmarksByTag */ 4 | // jshint esversion: 6 5 | // jshint loopfunc: true 6 | 7 | const MDU = { 8 | 9 | copyright: "Copyright 2019 Opentecture authors. ", 10 | date: "2019-08-10", 11 | description: "Search for duplicate text strings in the JSON file", 12 | license: "MIT License", 13 | version: "0.5.05-0MDU", 14 | 15 | }; 16 | 17 | MDU.getMenuDuplicates= function() { 18 | 19 | const htm = 20 | ` 21 |
22 | 23 | Filter duplicates MDU 24 | 25 |

${ MDU.description }

26 | 27 |

28 | Search: 29 |

30 | 31 |
32 | 33 |
34 | 35 |
36 | `; 37 | 38 | return htm; 39 | 40 | }; 41 | 42 | 43 | 44 | MDU.setMenuDuplicates = function( bookmarks = BOP.bookmarks ){ 45 | 46 | if ( MDUdet.open === false ) return; 47 | 48 | inpTagsIgnore.value = ""; 49 | 50 | bookmarks = COR.getBookmarksFilterByTagsToIgnore( bookmarks ); 51 | 52 | let markHtm = `

`; 53 | 54 | let dupes = []; 55 | 56 | bookmarks.forEach( ( bookmark, count ) => { 57 | 58 | const matches = BOP.bookmarks.filter( bopmark => bopmark.url === bookmark.url ); 59 | 60 | if ( matches.length > 1 ) { 61 | 62 | let color; 63 | if ( matches.find( match => match.tags.includes( "duplicate" ) ) ) { 64 | 65 | //console.log( 'matches', matches ); 66 | color = bookmark.tags.includes( "duplicate" ) ? "style=background-color:pink;" : "style=background-color:lightgreen;" ; 67 | 68 | console.log( '', 23 ); 69 | } 70 | 71 | const index = BOP.bookmarks.indexOf( bookmark ); 72 | 73 | markHtm += 74 | ` 75 |
76 |
${ count + 1 }.
77 |
78 |
79 |
80 | `; 81 | 82 | dupes.push( bookmark ); 83 | 84 | } 85 | 86 | } ); 87 | 88 | MDUdivJsonLines.innerHTML = markHtm; 89 | 90 | pDupes.innerHTML = `${ dupes.length } duplicates`; 91 | 92 | BOP.setBookmarks( dupes.sort() ); 93 | 94 | }; 95 | 96 | 97 | 98 | MDU.filterBookmarks = function ( input ) { 99 | 100 | const str = input.value; 101 | //console.log( 'str', str ); 102 | const a = document.createElement( 'a' ); 103 | 104 | let bookmarks = []; 105 | 106 | if ( str === "" ) { 107 | 108 | bookmarks = BOP.bookmarks; 109 | 110 | } else { 111 | 112 | bookmarks = BOP.bookmarks.filter( bookmark => { 113 | 114 | const bookmarkString = JSON.stringify( bookmark ); 115 | 116 | return bookmarkString.includes( str ); 117 | 118 | } ); 119 | 120 | } 121 | 122 | MDU.setMenuSearch ( bookmarks ); 123 | 124 | }; -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-05/js-menu/mfo-menu-file-order.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | /* global BM, MFOdet, MFOdivBookmarksByTag */ 4 | // jshint esversion: 6 5 | // jshint loopfunc: true 6 | 7 | const MFO = { 8 | 9 | copyright: "Copyright 2019 Opentecture authors. ", 10 | date: "2019-08-10", 11 | description: "Buttons for every bookmark in file order, unfiltered", 12 | license: "MIT License", 13 | version: "0.5.05-0mfo", 14 | 15 | }; 16 | 17 | 18 | MFO.getMenuFileOrder= function() { 19 | 20 | const htm = 21 | ` 22 |
23 | 24 | Bookmarks in file order MFO 25 | 26 |

${ MFO.description }

27 | 28 |

29 | Search: 30 |

31 | 32 |
33 | 34 |
35 | 36 |
37 | `; 38 | 39 | return htm; 40 | 41 | }; 42 | 43 | 44 | 45 | MFO.setMenuJsonLines = function( bookmarks = BOP.jsonLines ){ 46 | 47 | if ( MFOdet.open === false ) return; 48 | 49 | let markHtm = `

${ BOP.bookmarks.length } links

`; 50 | 51 | for ( let bookmark of bookmarks) { 52 | 53 | if ( !bookmark.url || !bookmark.type === "url" ) { continue; } 54 | 55 | const index = bookmarks.indexOf( bookmark ); 56 | 57 | markHtm += 58 | ` 59 |
60 | 61 | 62 |
63 | `; 64 | 65 | } 66 | 67 | MFOdivJsonLines.innerHTML = markHtm; 68 | 69 | //BM.setBookmarks( bookmarks ); 70 | 71 | }; 72 | 73 | 74 | 75 | MFO.filterBookmarks = function ( input ) { 76 | 77 | const str = input.value; 78 | //console.log( 'str', str ); 79 | const a = document.createElement( 'a' ); 80 | 81 | MFO.bookmarks = []; 82 | 83 | if ( str === "" ) { 84 | 85 | for ( let line of BM.lines ) { 86 | //console.log( 'line', line ); 87 | 88 | //if ( line.slice( 0, 1 ) !== "{" ) { continue; } 89 | 90 | const jsonl = JSON.parse( line ); 91 | //console.log( 'jsonl', jsonl ); 92 | 93 | if ( jsonl.type === "url" ) { MFO.bookmarks.push( jsonl ); } 94 | 95 | } 96 | 97 | } else { 98 | 99 | for ( let line of BM.lines ) { 100 | 101 | //if ( line.slice( 0, 1 ) !== "{" ) { continue; } 102 | //console.log( 'line', line ); 103 | 104 | const jsonl = JSON.parse( line ); 105 | //console.log( 'jsonl', jsonl.url ); 106 | 107 | if ( jsonl.url ) { 108 | 109 | a.href = jsonl.url; 110 | const site = a.hostname; 111 | //console.log( 'site', site ); 112 | 113 | if ( site.includes( str ) ) { MFO.bookmarks.push( jsonl ); } 114 | 115 | } 116 | 117 | } 118 | 119 | } 120 | 121 | MFO.setMenuJsonLines( MFO.bookmarks ); 122 | 123 | }; -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-05/js-menu/mjl-menu-json-lines.js: -------------------------------------------------------------------------------- 1 | /* global BM, MJLdet, MJLdivBookmarksByTag */ 2 | // jshint esversion: 6 3 | // jshint loopfunc: true 4 | 5 | const MJL = { 6 | 7 | copyright: "Copyright 2019 Opentecture authors. ", 8 | date: "2019-08-10", 9 | description: "Display every line of JSON in the file - incomplete, work-in-progress", 10 | license: "MIT License", 11 | version: "0.5.05-0mjl", 12 | 13 | }; 14 | 15 | 16 | 17 | MJL.getMenuJsonLines = function() { 18 | 19 | const htm = 20 | ` 21 |
22 | 23 | Every JSON line in file MJL 24 | 25 |

${ MJL.description }

26 | 27 |

28 | Search text in tiles: 29 |

30 | 31 |
32 | 33 |
34 | 35 |
36 | `; 37 | 38 | return htm; 39 | 40 | }; 41 | 42 | 43 | 44 | MJL.setMenuJsonLines = function( bookmarks = BOP.jsonLines ){ 45 | 46 | if ( MJLdet.open === false ) return; 47 | 48 | let markHtm = `

${ bookmarks.length } links

`; 49 | 50 | bookmarks.forEach( ( bookmark, count ) => { 51 | 52 | const index = BOP.bookmarks.indexOf( bookmark ); 53 | 54 | markHtm += 55 | ` 56 |
57 |
${ count + 1 }.
58 |
59 |
60 |
61 | `; 62 | 63 | 64 | } ); 65 | 66 | MJLdivJsonLines.innerHTML = markHtm; 67 | 68 | //BOP.setBookmarks( bookmarks ); 69 | 70 | }; 71 | 72 | 73 | 74 | MJL.filterBookmarks = function ( input ) { 75 | 76 | const str = input.value.toLowerCase(); 77 | 78 | MJL.bookmarks = []; 79 | 80 | if ( str === "" ) { 81 | 82 | for ( let line of BOP.lines ) { 83 | 84 | const jsonl = JSON.parse( line ); 85 | 86 | if ( jsonl.type === "url" ) { MJL.bookmarks.push( jsonl ); } 87 | 88 | } 89 | 90 | } else { 91 | 92 | MJL.bookmarks = BOP.lines.map( line => JSON.parse( line ) ) 93 | .filter( jsonl => jsonl.name && jsonl.name.toLowerCase().includes( str ) ); 94 | 95 | } 96 | 97 | MJL.setMenuJsonLines( MJL.bookmarks ); 98 | 99 | }; -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-05/js-menu/mse.menu-search.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | /* global BM, MSEdet, MSEdivBookmarksByTag */ 4 | // jshint esversion: 6 5 | // jshint loopfunc: true 6 | 7 | const MSE = { 8 | 9 | copyright: "Copyright 2019 Opentecture authors. ", 10 | date: "2019-08-10", 11 | description: "Search for text strings in the JSON file", 12 | license: "MIT License", 13 | version: "0.5.05-0MSE", 14 | 15 | }; 16 | 17 | MSE.getMenuSearch= function() { 18 | 19 | const htm = 20 | ` 21 |
22 | 23 | Filter bookmarks by search MSE 24 | 25 |

${ MSE.description }

26 | 27 |

28 | Search: 29 |

30 | 31 |
32 | 33 |
34 | 35 |
36 | `; 37 | 38 | return htm; 39 | 40 | }; 41 | 42 | 43 | 44 | MSE.setMenuSearch = function( bookmarks = BOP.bookmarks ){ 45 | 46 | if ( MSEdet.open === false ) return; 47 | 48 | bookmarks = COR.getBookmarksFilterByTagsToIgnore( bookmarks ); 49 | 50 | let markHtm = `

${ bookmarks.length } links

`; 51 | 52 | bookmarks.forEach( ( bookmark, count ) => { 53 | 54 | const index = BOP.bookmarks.indexOf( bookmark ); 55 | 56 | const colorTags = bookmark.tags.length <=1 ? "background-color:pink;" : ""; 57 | 58 | const comments = BOP.comments.filter( comment => comment.bookmarkId === bookmark.id ); 59 | 60 | //console.log( 'com', comments.length ); 61 | 62 | const colorComments = comments.length < 1 ? "background-color:pink;" : ""; 63 | 64 | markHtm += 65 | ` 66 |
67 |
${ count + 1 }
68 |
69 |
70 |
71 | `; 72 | 73 | } ); 74 | 75 | MSEdivJsonLines.innerHTML = markHtm; 76 | 77 | BOP.setBookmarks( bookmarks ); 78 | 79 | }; 80 | 81 | 82 | 83 | MSE.filterBookmarks = function ( input ) { 84 | 85 | const str = input.value; 86 | //console.log( 'str', str ); 87 | const a = document.createElement( 'a' ); 88 | 89 | let bookmarks = []; 90 | 91 | if ( str === "" ) { 92 | 93 | bookmarks = BOP.bookmarks; 94 | 95 | } else { 96 | 97 | bookmarks = BOP.bookmarks.filter( bookmark => { 98 | 99 | const bookmarkString = JSON.stringify( bookmark ); 100 | 101 | return bookmarkString.includes( str ); 102 | 103 | } ); 104 | 105 | } 106 | 107 | MSE.setMenuSearch ( bookmarks ); 108 | 109 | }; -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-05/js/cor-core.js: -------------------------------------------------------------------------------- 1 | /* globals FOB */ 2 | /* jshint esversion: 6 */ 3 | /* jshint loopfunc: true */ 4 | 5 | 6 | const COR = { 7 | "copyright": "Copyright 2019 Opentecture authors. MIT License", 8 | "date": "2019-06-23", 9 | "description": "core - Contains local overrides", 10 | "helpFile": "cor-core/README.md", 11 | "version": "0.0.0-1cor", 12 | }; 13 | 14 | 15 | //THM.themeUrlStorage = 'addALineTheme'; // set for each instance in HTML file 16 | //THM.cssBasic = "https://pushme-pullyou.github.io/tootoo14/js-14-03/style.css"; 17 | //THM.backgroundColor = "#eed" 18 | 19 | FOB.urlDefaultFile = "../../bookmarks.json"; 20 | 21 | POP.license = "../../../../license" 22 | 23 | // For main menu header 24 | MNU.helpFile = "../../README.md"; 25 | 26 | MNU.description = `Basic bookmark manager and editor with tagging, descriptions and comments`; 27 | 28 | MNU.urlSourceCode = "https://github.com/opentecture/mindmapping/tree/master/sandbox/opentecture-bookmarks"; 29 | 30 | MNU.homeText = "opentecture"; 31 | MNU.homeTitle = "Building to a common, scalable standard creates new opportunities to design and create objects and spaces in a collaborative way."; 32 | MNU.homeUrl = "https://www.opentecture.com/"; 33 | 34 | MNU.repoText = "mindmapping"; 35 | MNU.repoTitle = "Mindmapping is a collection of basic plain-vanilla JavaScript scripts for idea management using GitHub pages, 3D and whatever else comes to mind"; 36 | MNU.repoUrl = "https://opentecture.github.io/mindmapping"; 37 | 38 | MNU.appText = "bookmarks"; 39 | MNU.appTitle = ""; //"Basic html content management script with sliding menu, css theme selection, Markdown to HTML, drag and drop file reading capability, access to frequently used pages and more"; 40 | MNU.appUrl = "https://opentecture.github.io/mindmapping/#sandbox/opentecture-bookmarks/README.md"; 41 | 42 | MNU.footerPopupUrl = "https://pushme-pullyou.github.io/tootoo14/"; 43 | MNU.footerTarget = "target=_blank"; 44 | MNU.footerIssues = "https://github.com/opentecture/mindmapping/issues"; 45 | 46 | 47 | COR.getBookmarksFilterByTagsToIgnore = function ( bookmarks ) { 48 | 49 | const tagsToIgnore = inpTagsIgnore.value.split( "," ); 50 | 51 | const filtered = bookmarks.filter( bookmark => { 52 | 53 | let remove = false; 54 | 55 | for ( let tag of tagsToIgnore ) { 56 | 57 | if ( bookmark.tags.includes( tag ) ) { 58 | 59 | remove = true; 60 | break; 61 | 62 | } 63 | 64 | } 65 | 66 | return remove === false; 67 | 68 | } ); 69 | //console.log( '', filtered.length ); 70 | 71 | return filtered; 72 | 73 | }; -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-05/js/tga-tags-add.js: -------------------------------------------------------------------------------- 1 | /* global BM, BMinpTags, TGAdivTagsSelect */ 2 | /* jshint esversion: 6 */ 3 | /* jshint loopfunc: true */ 4 | 5 | 6 | const TGA = { 7 | 8 | "copyright": "Copyright 2019 pushMe-pullYou authors. MIT License", 9 | "date": "2019-08-10", 10 | "description": "Add curated (hopefully) tags to bookmarks", 11 | "version": "0.5.05-0TGA", 12 | 13 | }; 14 | 15 | 16 | 17 | TGA.getMenuTagsAdd = function() { 18 | 19 | const htm = 20 | ` 21 |
22 | 23 | Tags add TGA 24 | 25 |

${ TGA.description }

26 | 27 |
28 | 29 |
30 | `; 31 | 32 | return htm; 33 | 34 | }; 35 | 36 | 37 | 38 | TGA.onToggle = function() { 39 | 40 | 41 | //const tagSets = BM.jsonLines.filter( line => line.type === "tagset" ); 42 | //console.log( '', tagSets ); 43 | 44 | let htm = ""; 45 | 46 | for ( let tagSet of BOP.tagSets ) { 47 | 48 | //const json = JSON.parse( tagSet ); 49 | 50 | const options = tagSet.tags.map( tag => `` ).join(); 51 | //console.log( 'options ', options ); 52 | 53 | htm += 54 | `

55 | 56 | ${tagSet.name }
57 | 58 | 59 |

 `; 60 | 61 | } 62 | 63 | TGAdivTagsSelect.innerHTML = htm; 64 | 65 | }; 66 | 67 | 68 | 69 | TGA.addTag = function( select ) { 70 | 71 | const comma = BEDinpTags.value === "" || BEDinpTags.value.endsWith( ",") ? "" : ","; 72 | 73 | BEDinpTags.value += comma + select.value; 74 | 75 | }; -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-05/popup.md: -------------------------------------------------------------------------------- 1 | ### Opentecture online resources 2 | 3 | Hello, world! This script is designed to help you explore web sites that embrace the Opentecture mission: A collection of notes on collaborative systems and modular architecture. And it is still a work-in-progress at an early stage of development. 4 | 5 | Click anywhere outside this popup to close this popup. 6 | 7 | Press Control-Shift-J | Command-Option-J to see if the JavaScript console reports any errors. 8 | 9 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-06/bop-bookmark-onload-parse/v-0-00/bop-bookmark-onload-parse.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opentecture/mindmapping/a0204a90cec8eb3795db511c59d1d7e74e6d9d3f/sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-06/bop-bookmark-onload-parse/v-0-00/bop-bookmark-onload-parse.html -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-06/bop-bookmark-onload-parse/v-0-00/bop-bookmark-onload-parse.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opentecture/mindmapping/a0204a90cec8eb3795db511c59d1d7e74e6d9d3f/sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-06/bop-bookmark-onload-parse/v-0-00/bop-bookmark-onload-parse.md -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-06/foj-file-open-json/v-0-00/foj-file-open-json.js: -------------------------------------------------------------------------------- 1 | /* globals JSZip */ 2 | // jshint esversion: 6 3 | /* jshint loopfunc: true */ 4 | 5 | var FOJ = { 6 | 7 | "copyright": "Copyright 2019 pushMe pullYou authors", 8 | "date": "2019-09-28", 9 | "description": "", 10 | "helpFile": "", 11 | "license": "MIT License", 12 | "urlSourceCode": "", 13 | "version": "0.00.00-0foj" 14 | }; 15 | 16 | 17 | FOJ.requestFile = function( url ) { 18 | 19 | if ( !url ) { return; } 20 | 21 | FOJ.url = url; 22 | FOJ.fileName = url.split( "/" ).pop(); 23 | 24 | FOJ.timeStart = performance.now(); 25 | 26 | FOJ.xhr = new XMLHttpRequest(); // declare now to load event listeners in other modules 27 | 28 | FOJ.xhr.open( 'GET', url, true ); 29 | FOJ.xhr.onerror = function( xhr ) { console.log( 'error:', xhr ); }; 30 | FOJ.xhr.onprogress = function ( xhr ) { }; //console.log( 'loaded:', xhr.loaded ); }; 31 | FOJ.xhr.onload = function( xhr ) { FOJ.callbackJson( xhr.target.response ); }; 32 | FOJ.xhr.send( null ); 33 | 34 | }; 35 | 36 | 37 | 38 | FOJ.callbackJson = function( text ) { 39 | 40 | FOJ.text = text; 41 | FOJ.jsonLines = FOJ.text.split(/\r\n|\n/) 42 | .filter( line => line.slice( 0, 1 ) === "{" ) 43 | .map( line => JSON.parse( line ) ); 44 | 45 | //console.log( 'FOJ.jsonLines', FOJ.jsonLines ); 46 | 47 | const eventJsonParse = new Event( 'FOJonJsonParse' ); 48 | 49 | // document.body.addEventListener( 'FOBonJsonParse', () => { 50 | // console.log( 'FOJ loaded', FOJ.fileName ) 51 | // BOP.onLoadParse( FOJ.jsonLines ) 52 | // }, false ); 53 | 54 | document.body.dispatchEvent( eventJsonParse ); 55 | 56 | }; -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-06/foj-file-open-json/v-0-00/foj-file-open-json.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opentecture/mindmapping/a0204a90cec8eb3795db511c59d1d7e74e6d9d3f/sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-06/foj-file-open-json/v-0-00/foj-file-open-json.md -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-06/js-lint/mdu-menu-duplicates.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | /* global BM, MDUdet, MDUdivBookmarksByTag */ 4 | // jshint esversion: 6 5 | // jshint loopfunc: true 6 | 7 | const MDU = { 8 | 9 | copyright: "Copyright 2019 Opentecture authors. ", 10 | date: "2019-08-10", 11 | description: "Search for duplicate text strings in the JSON file", 12 | license: "MIT License", 13 | version: "0.5.05-0MDU", 14 | 15 | }; 16 | 17 | MDU.getMenuDuplicates= function() { 18 | 19 | const htm = 20 | ` 21 |
22 | 23 | Find duplicates (MDU) 24 | 25 |

${ MDU.description }

26 | 27 |

28 | Search: 29 |

30 | 31 |
32 | 33 |
34 | 35 |
36 | `; 37 | 38 | return htm; 39 | 40 | }; 41 | 42 | 43 | 44 | MDU.setMenuDuplicates = function( bookmarks = BOP.bookmarks ){ 45 | 46 | if ( MDUdet.open === false ) return; 47 | 48 | inpTagsIgnore.value = ""; 49 | 50 | bookmarks = BOP.getBookmarksFilterByTagsToIgnore( bookmarks ); 51 | 52 | let markHtm = `

`; 53 | 54 | let dupes = []; 55 | 56 | bookmarks.forEach( ( bookmark, count ) => { 57 | 58 | const matches = BOP.bookmarks.filter( bopmark => bopmark.url === bookmark.url ); 59 | 60 | if ( matches.length > 1 ) { 61 | 62 | let color; 63 | if ( matches.find( match => match.tags.includes( "duplicate" ) ) ) { 64 | 65 | //console.log( 'matches', matches ); 66 | color = bookmark.tags.includes( "duplicate" ) ? "style=background-color:pink;" : "style=background-color:lightgreen;" ; 67 | 68 | console.log( '', 23 ); 69 | } 70 | 71 | const index = BOP.bookmarks.indexOf( bookmark ); 72 | 73 | markHtm += 74 | ` 75 |
76 |
${ count + 1 }.
77 |
78 |
79 |
80 | `; 81 | 82 | dupes.push( bookmark ); 83 | 84 | } 85 | 86 | } ); 87 | 88 | MDUdivJsonLines.innerHTML = markHtm; 89 | 90 | pDupes.innerHTML = `${ dupes.length } duplicates`; 91 | 92 | BOP.setBookmarks( dupes.sort() ); 93 | 94 | }; 95 | 96 | 97 | 98 | MDU.filterBookmarks = function ( input ) { 99 | 100 | const str = input.value; 101 | //console.log( 'str', str ); 102 | const a = document.createElement( 'a' ); 103 | 104 | let bookmarks = []; 105 | 106 | if ( str === "" ) { 107 | 108 | bookmarks = BOP.bookmarks; 109 | 110 | } else { 111 | 112 | bookmarks = BOP.bookmarks.filter( bookmark => { 113 | 114 | const bookmarkString = JSON.stringify( bookmark ); 115 | 116 | return bookmarkString.includes( str ); 117 | 118 | } ); 119 | 120 | } 121 | 122 | MDU.setMenuSearch ( bookmarks ); 123 | 124 | }; -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-06/js-menu/mfo-menu-file-order.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | /* global BM, MFOdet, MFOdivBookmarksByTag */ 4 | // jshint esversion: 6 5 | // jshint loopfunc: true 6 | 7 | const MFO = { 8 | 9 | copyright: "Copyright 2019 Opentecture authors. ", 10 | date: "2019-08-10", 11 | description: "Buttons for every bookmark in file order, unfiltered", 12 | license: "MIT License", 13 | version: "0.05.06-0mfo", 14 | 15 | }; 16 | 17 | 18 | MFO.getMenuFileOrder= function() { 19 | 20 | const htm = 21 | ` 22 |
23 | 24 | Bookmarks in file order (MFO) 25 | 26 |

${ MFO.description }

27 | 28 |

29 | Search: 30 |

31 | 32 |
33 | 34 |
35 | 36 |
37 | `; 38 | 39 | return htm; 40 | 41 | }; 42 | 43 | 44 | 45 | MFO.setMenuJsonLines = function( bookmarks = BOP.jsonLines ){ 46 | 47 | if ( MFOdet.open === false ) return; 48 | 49 | let markHtm = `

${ BOP.bookmarks.length } links

`; 50 | 51 | for ( let bookmark of bookmarks) { 52 | 53 | if ( !bookmark.url || !bookmark.type === "url" ) { continue; } 54 | 55 | const index = bookmarks.indexOf( bookmark ); 56 | 57 | markHtm += 58 | ` 59 |
60 | 61 | 62 |
63 | `; 64 | 65 | } 66 | 67 | MFOdivJsonLines.innerHTML = markHtm; 68 | 69 | //BM.setBookmarks( bookmarks ); 70 | 71 | }; 72 | 73 | 74 | 75 | MFO.filterBookmarks = function ( input ) { 76 | 77 | const str = input.value; 78 | //console.log( 'str', str ); 79 | const a = document.createElement( 'a' ); 80 | 81 | MFO.bookmarks = []; 82 | 83 | if ( str === "" ) { 84 | 85 | for ( let line of BM.lines ) { 86 | //console.log( 'line', line ); 87 | 88 | //if ( line.slice( 0, 1 ) !== "{" ) { continue; } 89 | 90 | const jsonl = JSON.parse( line ); 91 | //console.log( 'jsonl', jsonl ); 92 | 93 | if ( jsonl.type === "url" ) { MFO.bookmarks.push( jsonl ); } 94 | 95 | } 96 | 97 | } else { 98 | 99 | for ( let line of BM.lines ) { 100 | 101 | //if ( line.slice( 0, 1 ) !== "{" ) { continue; } 102 | //console.log( 'line', line ); 103 | 104 | const jsonl = JSON.parse( line ); 105 | //console.log( 'jsonl', jsonl.url ); 106 | 107 | if ( jsonl.url ) { 108 | 109 | a.href = jsonl.url; 110 | const site = a.hostname; 111 | //console.log( 'site', site ); 112 | 113 | if ( site.includes( str ) ) { MFO.bookmarks.push( jsonl ); } 114 | 115 | } 116 | 117 | } 118 | 119 | } 120 | 121 | MFO.setMenuJsonLines( MFO.bookmarks ); 122 | 123 | }; -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-06/js-menu/mjl-menu-json-lines.js: -------------------------------------------------------------------------------- 1 | /* global BM, MJLdet, MJLdivBookmarksByTag */ 2 | // jshint esversion: 6 3 | // jshint loopfunc: true 4 | 5 | const MJL = { 6 | 7 | copyright: "Copyright 2019 Opentecture authors. ", 8 | date: "2019-09-29", 9 | description: "Display every line of JSON in the file - incomplete, work-in-progress", 10 | license: "MIT License", 11 | version: "0.05.06-0mjl", 12 | 13 | }; 14 | 15 | 16 | 17 | MJL.getMenuJsonLines = function() { 18 | 19 | const htm = 20 | ` 21 |
22 | 23 | Every line in file (MJL) 24 | 25 |

${ MJL.description }

26 | 27 |

28 | Search text in lines: 29 |

30 | 31 |

32 | 33 |
34 | 35 |
36 | 37 |
38 | `; 39 | 40 | return htm; 41 | 42 | }; 43 | 44 | 45 | 46 | MJL.setMenuJsonLines = function( jsonLines = BOP.jsonLines, str = "JSON data" ){ 47 | 48 | if ( MJLdet.open === false ) return; 49 | 50 | MJL.jsonLines = jsonLines; 51 | 52 | MJLpStats.innerHTML = `

${ jsonLines.length } lines with ${ str } in file

`; 53 | 54 | markHtm = jsonLines.map( ( line, count ) => 55 | ` 56 |
57 |
${ count + 1 }.
58 |
59 |
60 |
61 | ` 62 | 63 | ).join( "" ); 64 | 65 | MJLdivJsonLines.innerHTML = markHtm; 66 | 67 | }; 68 | 69 | 70 | 71 | MJL.filterBookmarks = function ( input ) { 72 | 73 | const str = input.value.toLowerCase() || ""; 74 | 75 | MJL.jsonLines = BOP.jsonLines.filter( line => JSON.stringify( line ).includes( str ) ); 76 | 77 | MJL.setMenuJsonLines( MJL.jsonLines, `"${str }"` ); 78 | 79 | }; 80 | 81 | 82 | 83 | MJL.setMainContents = function ( index ) { 84 | 85 | mainContents.innerText = JSON.stringify( MJL.jsonLines[ index ], null, " " ); 86 | 87 | } -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-06/js-menu/mse.menu-search-2019-10-05.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | /* global BM, MSEdet, MSEdivBookmarksByTag */ 4 | // jshint esversion: 6 5 | // jshint loopfunc: true 6 | 7 | const MSE = { 8 | 9 | copyright: "Copyright 2019 Opentecture authors. ", 10 | date: "2019-08-10", 11 | description: "Search for text strings anywhere in the record. Pink icon on left: no tags. Pink to right: no comments.", 12 | license: "MIT License", 13 | version: "0.05.65-0MSE", 14 | 15 | }; 16 | 17 | MSE.getMenuSearch= function() { 18 | 19 | const htm = 20 | ` 21 |
22 | 23 | Bookmarks by search (MSE) 24 | 25 |

${ MSE.description }

26 | 27 |

28 | Search: 29 |

30 | 31 |
32 | 33 |
34 | 35 |
36 | `; 37 | 38 | return htm; 39 | 40 | }; 41 | 42 | 43 | 44 | MSE.filterBookmarks = function ( input ) { 45 | 46 | const str = input.value; 47 | //console.log( 'str', str ); 48 | const a = document.createElement( 'a' ); 49 | 50 | let bookmarks = []; 51 | 52 | if ( str === "" ) { 53 | 54 | bookmarks = BOP.bookmarks; 55 | 56 | } else { 57 | 58 | bookmarks = BOP.bookmarks.filter( bookmark => { 59 | 60 | const bookmarkString = JSON.stringify( bookmark ); 61 | 62 | return bookmarkString.includes( str ); 63 | 64 | } ); 65 | 66 | } 67 | 68 | MSE.setMenuSearch ( bookmarks ); 69 | 70 | }; 71 | 72 | MSE.setMenuSearch = function( bookmarks = BOP.bookmarks ){ 73 | 74 | if ( MSEdet.open === false ) return; 75 | 76 | bookmarks = BOP.getBookmarksFilterByTagsToIgnore( bookmarks ); 77 | 78 | let markHtm = `

${ bookmarks.length } links

`; 79 | 80 | bookmarks.forEach( ( bookmark, count ) => { 81 | 82 | const index = BOP.bookmarks.indexOf( bookmark ); 83 | 84 | const colorTags = bookmark.tags.length <=1 ? "background-color:pink;" : ""; 85 | 86 | const comments = BOP.comments.filter( comment => comment.bookmarkId === bookmark.id ); 87 | 88 | //console.log( 'com', comments.length ); 89 | 90 | const colorComments = comments.length < 1 ? "background-color:pink;" : ""; 91 | 92 | markHtm += 93 | ` 94 |
95 |
${ count + 1 }
96 |
97 |
98 |
99 | `; 100 | 101 | } ); 102 | 103 | MSEdivJsonLines.innerHTML = markHtm; 104 | 105 | BOP.setBookmarks( bookmarks ); 106 | 107 | }; 108 | 109 | 110 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-06/js-menu/mse.menu-search.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | /* global BM, MSEdet, MSEdivBookmarksByTag */ 4 | // jshint esversion: 6 5 | // jshint loopfunc: true 6 | 7 | const MSE = { 8 | 9 | copyright: "Copyright 2019 Opentecture authors. ", 10 | date: "2019-10-05", 11 | description: "Search for text strings anywhere in the record. Pink icon on left: no tags. Pink to right: no comments.", 12 | license: "MIT License", 13 | version: "0.05.06-1MSE", 14 | 15 | }; 16 | 17 | MSE.getMenuSearch= function() { 18 | 19 | const htm = 20 | ` 21 |
22 | 23 | Bookmarks by search (MSE) 24 | 25 |

${ MSE.description }

26 | 27 |

28 | Search: 29 |

30 | 31 |
32 | 33 |
34 | 35 |
36 | `; 37 | 38 | return htm; 39 | 40 | }; 41 | 42 | 43 | MSE.filterBookmarks = function ( input ) { 44 | 45 | const string = input.value; 46 | 47 | const strings = string ? string.split( " " ) : []; 48 | console.log( 'strings', strings ); 49 | 50 | MSE.bookmarks = BOP.getBookmarksFilterByTagsToIgnore( BOP.bookmarks ); 51 | 52 | strings.forEach( string => 53 | 54 | MSE.bookmarks = MSE.bookmarks.filter( bookmark => 55 | JSON.stringify( bookmark ).includes( string ) 56 | ) 57 | ) 58 | 59 | MSE.setMenuSearch( MSE.bookmarks ); 60 | 61 | BOP.setBookmarks( MSE.bookmarks ); 62 | 63 | }; 64 | 65 | 66 | MSE.setMenuSearch = function( bookmarks = MSE.bookmarks ){ 67 | 68 | if ( MSEdet.open === false ) return; 69 | 70 | let markHtm = `

${ bookmarks.length } links

`; 71 | 72 | bookmarks.forEach( ( bookmark, count ) => { 73 | 74 | const index = BOP.bookmarks.indexOf( bookmark ); 75 | 76 | const colorTags = bookmark.tags.length <=1 ? "background-color:pink;" : ""; 77 | 78 | const comments = BOP.comments.filter( comment => comment.bookmarkId === bookmark.id ); 79 | //console.log( 'com', comments.length ); 80 | 81 | const colorComments = comments.length < 1 ? "background-color:pink;" : ""; 82 | 83 | markHtm += 84 | ` 85 |
86 |
${ count + 1 }
87 |
88 |
89 |
90 | `; 91 | 92 | } ); 93 | 94 | MSEdivJsonLines.innerHTML = markHtm; 95 | 96 | }; 97 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-06/js/tga-tags-add.js: -------------------------------------------------------------------------------- 1 | /* global BM, BMinpTags, TGAdivTagsSelect */ 2 | /* jshint esversion: 6 */ 3 | /* jshint loopfunc: true */ 4 | 5 | 6 | const TGA = { 7 | 8 | "copyright": "Copyright 2019 pushMe-pullYou authors. MIT License", 9 | "date": "2019-08-10", 10 | "description": "Add curated (hopefully) tags to bookmarks", 11 | "version": "0.5.05-0TGA", 12 | 13 | }; 14 | 15 | 16 | 17 | TGA.getMenuTagsAdd = function() { 18 | 19 | const htm = 20 | ` 21 |
22 | 23 | Tags add (TGA) 24 | 25 |

${ TGA.description }

26 | 27 |
28 | 29 |
30 | `; 31 | 32 | return htm; 33 | 34 | }; 35 | 36 | 37 | 38 | TGA.onToggle = function() { 39 | 40 | 41 | //const tagSets = BM.jsonLines.filter( line => line.type === "tagset" ); 42 | //console.log( '', tagSets ); 43 | 44 | let htm = ""; 45 | 46 | for ( let tagSet of BOP.tagSets ) { 47 | 48 | //const json = JSON.parse( tagSet ); 49 | 50 | const options = tagSet.tags.map( tag => `` ).join(); 51 | //console.log( 'options ', options ); 52 | 53 | htm += 54 | `

55 | 56 | ${tagSet.name }
57 | 58 | 59 |

 `; 60 | 61 | } 62 | 63 | TGAdivTagsSelect.innerHTML = htm; 64 | 65 | }; 66 | 67 | 68 | 69 | TGA.addTag = function( select ) { 70 | 71 | const comma = BEDinpTags.value === "" || BEDinpTags.value.endsWith( ",") ? "" : ","; 72 | 73 | BEDinpTags.value += comma + select.value; 74 | 75 | }; -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-06/js/xxx-cor-core.js: -------------------------------------------------------------------------------- 1 | /* globals FOB */ 2 | /* jshint esversion: 6 */ 3 | /* jshint loopfunc: true */ 4 | 5 | 6 | const COR = { 7 | "copyright": "Copyright 2019 Opentecture authors. MIT License", 8 | "date": "2019-06-23", 9 | "description": "core - Contains local overrides", 10 | "helpFile": "cor-core/README.md", 11 | "version": "0.0.0-1cor", 12 | }; 13 | 14 | 15 | //THM.themeUrlStorage = 'addALineTheme'; // set for each instance in HTML file 16 | //THM.cssBasic = "https://pushme-pullyou.github.io/tootoo14/js-14-03/style.css"; 17 | //THM.backgroundColor = "#eed" 18 | 19 | FOB.urlDefaultFile = "../../bookmarks.json"; 20 | 21 | POP.license = "../../../../license" 22 | 23 | // For main menu header 24 | MNU.helpFile = "../../README.md"; 25 | 26 | MNU.description = `Basic bookmark manager and editor with tagging, descriptions and comments`; 27 | 28 | MNU.urlSourceCode = "https://github.com/opentecture/mindmapping/tree/master/sandbox/opentecture-bookmarks"; 29 | 30 | MNU.homeText = "opentecture"; 31 | MNU.homeTitle = "Building to a common, scalable standard creates new opportunities to design and create objects and spaces in a collaborative way."; 32 | MNU.homeUrl = "https://www.opentecture.com/"; 33 | 34 | MNU.repoText = "mindmapping"; 35 | MNU.repoTitle = "Mindmapping is a collection of basic plain-vanilla JavaScript scripts for idea management using GitHub pages, 3D and whatever else comes to mind"; 36 | MNU.repoUrl = "https://opentecture.github.io/mindmapping"; 37 | 38 | MNU.appText = "bookmarks"; 39 | MNU.appTitle = ""; //"Basic html content management script with sliding menu, css theme selection, Markdown to HTML, drag and drop file reading capability, access to frequently used pages and more"; 40 | MNU.appUrl = "https://opentecture.github.io/mindmapping/#sandbox/opentecture-bookmarks/README.md"; 41 | 42 | MNU.footerPopupUrl = "https://pushme-pullyou.github.io/tootoo14/"; 43 | MNU.footerTarget = "target=_blank"; 44 | MNU.footerIssues = "https://github.com/opentecture/mindmapping/issues"; 45 | 46 | 47 | COR.getBookmarksFilterByTagsToIgnore = function ( bookmarks ) { 48 | 49 | const tagsToIgnore = inpTagsIgnore.value.split( "," ); 50 | 51 | const filtered = bookmarks.filter( bookmark => { 52 | 53 | let remove = false; 54 | 55 | for ( let tag of tagsToIgnore ) { 56 | 57 | if ( bookmark.tags.includes( tag ) ) { 58 | 59 | remove = true; 60 | break; 61 | 62 | } 63 | 64 | } 65 | 66 | return remove === false; 67 | 68 | } ); 69 | //console.log( '', filtered.length ); 70 | 71 | return filtered; 72 | 73 | }; -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-07/bop-bookmark-onload-parse/v-0-00/bop-bookmark-onload-parse.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opentecture/mindmapping/a0204a90cec8eb3795db511c59d1d7e74e6d9d3f/sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-07/bop-bookmark-onload-parse/v-0-00/bop-bookmark-onload-parse.html -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-07/bop-bookmark-onload-parse/v-0-00/bop-bookmark-onload-parse.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opentecture/mindmapping/a0204a90cec8eb3795db511c59d1d7e74e6d9d3f/sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-07/bop-bookmark-onload-parse/v-0-00/bop-bookmark-onload-parse.md -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-07/foj-file-open-json/v-0-00/foj-file-open-json.js: -------------------------------------------------------------------------------- 1 | /* globals JSZip */ 2 | // jshint esversion: 6 3 | /* jshint loopfunc: true */ 4 | 5 | var FOJ = { 6 | 7 | "copyright": "Copyright 2019 pushMe pullYou authors", 8 | "date": "2019-09-28", 9 | "description": "", 10 | "helpFile": "", 11 | "license": "MIT License", 12 | "urlSourceCode": "", 13 | "version": "0.00.00-0foj" 14 | }; 15 | 16 | 17 | FOJ.requestFile = function( url ) { 18 | 19 | if ( !url ) { return; } 20 | 21 | FOJ.url = url; 22 | FOJ.fileName = url.split( "/" ).pop(); 23 | 24 | FOJ.timeStart = performance.now(); 25 | 26 | FOJ.xhr = new XMLHttpRequest(); // declare now to load event listeners in other modules 27 | 28 | FOJ.xhr.open( 'GET', url, true ); 29 | FOJ.xhr.onerror = function( xhr ) { console.log( 'error:', xhr ); }; 30 | FOJ.xhr.onprogress = function ( xhr ) { }; //console.log( 'loaded:', xhr.loaded ); }; 31 | FOJ.xhr.onload = function( xhr ) { FOJ.callbackJson( xhr.target.response ); }; 32 | FOJ.xhr.send( null ); 33 | 34 | }; 35 | 36 | 37 | 38 | FOJ.callbackJson = function( text ) { 39 | 40 | FOJ.text = text; 41 | FOJ.jsonLines = FOJ.text.split(/\r\n|\n/) 42 | .filter( line => line.slice( 0, 1 ) === "{" ) 43 | .map( line => JSON.parse( line ) ); 44 | 45 | //console.log( 'FOJ.jsonLines', FOJ.jsonLines ); 46 | 47 | const eventJsonParse = new Event( 'FOJonJsonParse' ); 48 | 49 | // document.body.addEventListener( 'FOBonJsonParse', () => { 50 | // console.log( 'FOJ loaded', FOJ.fileName ) 51 | // BOP.onLoadParse( FOJ.jsonLines ) 52 | // }, false ); 53 | 54 | document.body.dispatchEvent( eventJsonParse ); 55 | 56 | }; -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-07/foj-file-open-json/v-0-00/foj-file-open-json.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opentecture/mindmapping/a0204a90cec8eb3795db511c59d1d7e74e6d9d3f/sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-07/foj-file-open-json/v-0-00/foj-file-open-json.md -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-07/js-lint/mdu-menu-duplicates.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | /* global BM, MDUdet, MDUdivBookmarksByTag */ 4 | // jshint esversion: 6 5 | // jshint loopfunc: true 6 | 7 | const MDU = { 8 | 9 | copyright: "Copyright 2019 Opentecture authors. ", 10 | date: "2019-08-10", 11 | description: "Search for duplicate text strings in the JSON file", 12 | license: "MIT License", 13 | version: "0.5.05-0MDU", 14 | 15 | }; 16 | 17 | MDU.getMenuDuplicates= function() { 18 | 19 | const htm = 20 | ` 21 |
22 | 23 | Find duplicates (MDU) 24 | 25 |

${ MDU.description }

26 | 27 |

28 | Search: 29 |

30 | 31 |
32 | 33 |
34 | 35 |
36 | `; 37 | 38 | return htm; 39 | 40 | }; 41 | 42 | 43 | 44 | MDU.setMenuDuplicates = function( bookmarks = BOP.bookmarks ){ 45 | 46 | if ( MDUdet.open === false ) return; 47 | 48 | inpTagsIgnore.value = ""; 49 | 50 | bookmarks = BOP.getBookmarksFilterByTagsToIgnore( bookmarks ); 51 | 52 | let markHtm = `

`; 53 | 54 | let dupes = []; 55 | 56 | bookmarks.forEach( ( bookmark, count ) => { 57 | 58 | const matches = BOP.bookmarks.filter( bopmark => bopmark.url === bookmark.url ); 59 | 60 | if ( matches.length > 1 ) { 61 | 62 | let color; 63 | if ( matches.find( match => match.tags.includes( "duplicate" ) ) ) { 64 | 65 | //console.log( 'matches', matches ); 66 | color = bookmark.tags.includes( "duplicate" ) ? "style=background-color:pink;" : "style=background-color:lightgreen;" ; 67 | 68 | console.log( '', 23 ); 69 | } 70 | 71 | const index = BOP.bookmarks.indexOf( bookmark ); 72 | 73 | markHtm += 74 | ` 75 |
76 |
${ count + 1 }.
77 |
78 |
79 |
80 | `; 81 | 82 | dupes.push( bookmark ); 83 | 84 | } 85 | 86 | } ); 87 | 88 | MDUdivJsonLines.innerHTML = markHtm; 89 | 90 | pDupes.innerHTML = `${ dupes.length } duplicates`; 91 | 92 | BOP.setBookmarks( dupes.sort() ); 93 | 94 | }; 95 | 96 | 97 | 98 | MDU.filterBookmarks = function ( input ) { 99 | 100 | const str = input.value; 101 | //console.log( 'str', str ); 102 | const a = document.createElement( 'a' ); 103 | 104 | let bookmarks = []; 105 | 106 | if ( str === "" ) { 107 | 108 | bookmarks = BOP.bookmarks; 109 | 110 | } else { 111 | 112 | bookmarks = BOP.bookmarks.filter( bookmark => { 113 | 114 | const bookmarkString = JSON.stringify( bookmark ); 115 | 116 | return bookmarkString.includes( str ); 117 | 118 | } ); 119 | 120 | } 121 | 122 | MDU.setMenuSearch ( bookmarks ); 123 | 124 | }; -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-07/js-menu/mfo-menu-file-order.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | /* global BM, MFOdet, MFOdivBookmarksByTag */ 4 | // jshint esversion: 6 5 | // jshint loopfunc: true 6 | 7 | const MFO = { 8 | 9 | copyright: "Copyright 2019 Opentecture authors. ", 10 | date: "2019-08-10", 11 | description: "Buttons for every bookmark in file order, unfiltered", 12 | license: "MIT License", 13 | version: "0.05.06-0mfo", 14 | 15 | }; 16 | 17 | 18 | MFO.getMenuFileOrder= function() { 19 | 20 | const htm = 21 | ` 22 |
23 | 24 | Bookmarks in file order (MFO) 25 | 26 |

${ MFO.description }

27 | 28 |

29 | Search: 30 |

31 | 32 |
33 | 34 |
35 | 36 |
37 | `; 38 | 39 | return htm; 40 | 41 | }; 42 | 43 | 44 | 45 | MFO.setMenuJsonLines = function( bookmarks = BOP.jsonLines ){ 46 | 47 | if ( MFOdet.open === false ) return; 48 | 49 | let markHtm = `

${ BOP.bookmarks.length } links

`; 50 | 51 | for ( let bookmark of bookmarks) { 52 | 53 | if ( !bookmark.url || !bookmark.type === "url" ) { continue; } 54 | 55 | const index = bookmarks.indexOf( bookmark ); 56 | 57 | markHtm += 58 | ` 59 |
60 | 61 | 62 |
63 | `; 64 | 65 | } 66 | 67 | MFOdivJsonLines.innerHTML = markHtm; 68 | 69 | //BM.setBookmarks( bookmarks ); 70 | 71 | }; 72 | 73 | 74 | 75 | MFO.filterBookmarks = function ( input ) { 76 | 77 | const str = input.value; 78 | //console.log( 'str', str ); 79 | const a = document.createElement( 'a' ); 80 | 81 | MFO.bookmarks = []; 82 | 83 | if ( str === "" ) { 84 | 85 | for ( let line of BM.lines ) { 86 | //console.log( 'line', line ); 87 | 88 | //if ( line.slice( 0, 1 ) !== "{" ) { continue; } 89 | 90 | const jsonl = JSON.parse( line ); 91 | //console.log( 'jsonl', jsonl ); 92 | 93 | if ( jsonl.type === "url" ) { MFO.bookmarks.push( jsonl ); } 94 | 95 | } 96 | 97 | } else { 98 | 99 | for ( let line of BM.lines ) { 100 | 101 | //if ( line.slice( 0, 1 ) !== "{" ) { continue; } 102 | //console.log( 'line', line ); 103 | 104 | const jsonl = JSON.parse( line ); 105 | //console.log( 'jsonl', jsonl.url ); 106 | 107 | if ( jsonl.url ) { 108 | 109 | a.href = jsonl.url; 110 | const site = a.hostname; 111 | //console.log( 'site', site ); 112 | 113 | if ( site.includes( str ) ) { MFO.bookmarks.push( jsonl ); } 114 | 115 | } 116 | 117 | } 118 | 119 | } 120 | 121 | MFO.setMenuJsonLines( MFO.bookmarks ); 122 | 123 | }; -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-07/js-menu/mjl-menu-json-lines.js: -------------------------------------------------------------------------------- 1 | /* global BM, MJLdet, MJLdivBookmarksByTag */ 2 | // jshint esversion: 6 3 | // jshint loopfunc: true 4 | 5 | const MJL = { 6 | 7 | copyright: "Copyright 2019 Opentecture authors. ", 8 | date: "2019-09-29", 9 | description: "Display every line of JSON in the file - incomplete, work-in-progress", 10 | license: "MIT License", 11 | version: "0.05.06-0mjl", 12 | 13 | }; 14 | 15 | 16 | 17 | MJL.getMenuJsonLines = function() { 18 | 19 | const htm = 20 | ` 21 |
22 | 23 | Every line in file (MJL) 24 | 25 |

${ MJL.description }

26 | 27 |

28 | Search text in lines: 29 |

30 | 31 |

32 | 33 |
34 | 35 |
36 | 37 |
38 | `; 39 | 40 | return htm; 41 | 42 | }; 43 | 44 | 45 | 46 | MJL.setMenuJsonLines = function( jsonLines = BOP.jsonLines, str = "JSON data" ){ 47 | 48 | if ( MJLdet.open === false ) return; 49 | 50 | MJL.jsonLines = jsonLines; 51 | 52 | MJLpStats.innerHTML = `

${ jsonLines.length } lines with ${ str } in file

`; 53 | 54 | markHtm = jsonLines.map( ( line, count ) => 55 | ` 56 |
57 |
${ count + 1 }.
58 |
59 |
60 |
61 | ` 62 | 63 | ).join( "" ); 64 | 65 | MJLdivJsonLines.innerHTML = markHtm; 66 | 67 | }; 68 | 69 | 70 | 71 | MJL.filterBookmarks = function ( input ) { 72 | 73 | const str = input.value.toLowerCase() || ""; 74 | 75 | MJL.jsonLines = BOP.jsonLines.filter( line => JSON.stringify( line ).includes( str ) ); 76 | 77 | MJL.setMenuJsonLines( MJL.jsonLines, `"${str }"` ); 78 | 79 | }; 80 | 81 | 82 | 83 | MJL.setMainContents = function ( index ) { 84 | 85 | mainContents.innerText = JSON.stringify( MJL.jsonLines[ index ], null, " " ); 86 | 87 | } -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-07/js-menu/mse.menu-search-2019-10-05.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | /* global BM, MSEdet, MSEdivBookmarksByTag */ 4 | // jshint esversion: 6 5 | // jshint loopfunc: true 6 | 7 | const MSE = { 8 | 9 | copyright: "Copyright 2019 Opentecture authors. ", 10 | date: "2019-08-10", 11 | description: "Search for text strings anywhere in the record. Pink icon on left: no tags. Pink to right: no comments.", 12 | license: "MIT License", 13 | version: "0.05.65-0MSE", 14 | 15 | }; 16 | 17 | MSE.getMenuSearch= function() { 18 | 19 | const htm = 20 | ` 21 |
22 | 23 | Bookmarks by search (MSE) 24 | 25 |

${ MSE.description }

26 | 27 |

28 | Search: 29 |

30 | 31 |
32 | 33 |
34 | 35 |
36 | `; 37 | 38 | return htm; 39 | 40 | }; 41 | 42 | 43 | 44 | MSE.filterBookmarks = function ( input ) { 45 | 46 | const str = input.value; 47 | //console.log( 'str', str ); 48 | const a = document.createElement( 'a' ); 49 | 50 | let bookmarks = []; 51 | 52 | if ( str === "" ) { 53 | 54 | bookmarks = BOP.bookmarks; 55 | 56 | } else { 57 | 58 | bookmarks = BOP.bookmarks.filter( bookmark => { 59 | 60 | const bookmarkString = JSON.stringify( bookmark ); 61 | 62 | return bookmarkString.includes( str ); 63 | 64 | } ); 65 | 66 | } 67 | 68 | MSE.setMenuSearch ( bookmarks ); 69 | 70 | }; 71 | 72 | MSE.setMenuSearch = function( bookmarks = BOP.bookmarks ){ 73 | 74 | if ( MSEdet.open === false ) return; 75 | 76 | bookmarks = BOP.getBookmarksFilterByTagsToIgnore( bookmarks ); 77 | 78 | let markHtm = `

${ bookmarks.length } links

`; 79 | 80 | bookmarks.forEach( ( bookmark, count ) => { 81 | 82 | const index = BOP.bookmarks.indexOf( bookmark ); 83 | 84 | const colorTags = bookmark.tags.length <=1 ? "background-color:pink;" : ""; 85 | 86 | const comments = BOP.comments.filter( comment => comment.bookmarkId === bookmark.id ); 87 | 88 | //console.log( 'com', comments.length ); 89 | 90 | const colorComments = comments.length < 1 ? "background-color:pink;" : ""; 91 | 92 | markHtm += 93 | ` 94 |
95 |
${ count + 1 }
96 |
97 |
98 |
99 | `; 100 | 101 | } ); 102 | 103 | MSEdivJsonLines.innerHTML = markHtm; 104 | 105 | BOP.setBookmarks( bookmarks ); 106 | 107 | }; 108 | 109 | 110 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-07/js-menu/mse.menu-search.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | /* global BM, MSEdet, MSEdivBookmarksByTag */ 4 | // jshint esversion: 6 5 | // jshint loopfunc: true 6 | 7 | const MSE = { 8 | 9 | copyright: "Copyright 2019 Opentecture authors. ", 10 | date: "2019-10-05", 11 | description: "Search for text strings anywhere in the record. Pink icon on left: no tags. Pink to right: no comments.", 12 | license: "MIT License", 13 | version: "0.05.06-1MSE", 14 | 15 | }; 16 | 17 | MSE.getMenuSearch= function() { 18 | 19 | const htm = 20 | ` 21 |
22 | 23 | Bookmarks by search (MSE) 24 | 25 |

${ MSE.description }

26 | 27 |

28 | Search: 29 |

30 | 31 |
32 | 33 |
34 | 35 |
36 | `; 37 | 38 | return htm; 39 | 40 | }; 41 | 42 | 43 | MSE.filterBookmarks = function ( input ) { 44 | 45 | const string = input.value; 46 | 47 | const strings = string ? string.split( " " ) : []; 48 | console.log( 'strings', strings ); 49 | 50 | MSE.bookmarks = BOP.getBookmarksFilterByTagsToIgnore( BOP.bookmarks ); 51 | 52 | strings.forEach( string => 53 | 54 | MSE.bookmarks = MSE.bookmarks.filter( bookmark => 55 | JSON.stringify( bookmark ).includes( string ) 56 | ) 57 | ) 58 | 59 | MSE.setMenuSearch( MSE.bookmarks ); 60 | 61 | BOP.setBookmarks( MSE.bookmarks ); 62 | 63 | }; 64 | 65 | 66 | MSE.setMenuSearch = function( bookmarks = MSE.bookmarks ){ 67 | 68 | if ( MSEdet.open === false ) return; 69 | 70 | let markHtm = `

${ bookmarks.length } links

`; 71 | 72 | bookmarks.forEach( ( bookmark, count ) => { 73 | 74 | const index = BOP.bookmarks.indexOf( bookmark ); 75 | 76 | const colorTags = bookmark.tags.length <=1 ? "background-color:pink;" : ""; 77 | 78 | const comments = BOP.comments.filter( comment => comment.bookmarkId === bookmark.id ); 79 | //console.log( 'com', comments.length ); 80 | 81 | const colorComments = comments.length < 1 ? "background-color:pink;" : ""; 82 | 83 | markHtm += 84 | ` 85 |
86 |
${ count + 1 }
87 |
88 |
89 |
90 | `; 91 | 92 | } ); 93 | 94 | MSEdivJsonLines.innerHTML = markHtm; 95 | 96 | }; 97 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-07/js/tga-tags-add.js: -------------------------------------------------------------------------------- 1 | /* global BM, BMinpTags, TGAdivTagsSelect */ 2 | /* jshint esversion: 6 */ 3 | /* jshint loopfunc: true */ 4 | 5 | 6 | const TGA = { 7 | 8 | "copyright": "Copyright 2019 pushMe-pullYou authors. MIT License", 9 | "date": "2019-08-10", 10 | "description": "Add curated (hopefully) tags to bookmarks", 11 | "version": "0.5.05-0TGA", 12 | 13 | }; 14 | 15 | 16 | 17 | TGA.getMenuTagsAdd = function() { 18 | 19 | const htm = 20 | ` 21 |
22 | 23 | Tags add (TGA) 24 | 25 |

${ TGA.description }

26 | 27 |
28 | 29 |
30 | `; 31 | 32 | return htm; 33 | 34 | }; 35 | 36 | 37 | 38 | TGA.onToggle = function() { 39 | 40 | 41 | //const tagSets = BM.jsonLines.filter( line => line.type === "tagset" ); 42 | //console.log( '', tagSets ); 43 | 44 | let htm = ""; 45 | 46 | for ( let tagSet of BOP.tagSets ) { 47 | 48 | //const json = JSON.parse( tagSet ); 49 | 50 | const options = tagSet.tags.map( tag => `` ).join(); 51 | //console.log( 'options ', options ); 52 | 53 | htm += 54 | `

55 | 56 | ${tagSet.name }
57 | 58 | 59 |

 `; 60 | 61 | } 62 | 63 | TGAdivTagsSelect.innerHTML = htm; 64 | 65 | }; 66 | 67 | 68 | 69 | TGA.addTag = function( select ) { 70 | 71 | const comma = BEDinpTags.value === "" || BEDinpTags.value.endsWith( ",") ? "" : ","; 72 | 73 | BEDinpTags.value += comma + select.value; 74 | 75 | }; -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/add-a-line-bookmarks/v-0-5-07/js/xxx-cor-core.js: -------------------------------------------------------------------------------- 1 | /* globals FOB */ 2 | /* jshint esversion: 6 */ 3 | /* jshint loopfunc: true */ 4 | 5 | 6 | const COR = { 7 | "copyright": "Copyright 2019 Opentecture authors. MIT License", 8 | "date": "2019-06-23", 9 | "description": "core - Contains local overrides", 10 | "helpFile": "cor-core/README.md", 11 | "version": "0.0.0-1cor", 12 | }; 13 | 14 | 15 | //THM.themeUrlStorage = 'addALineTheme'; // set for each instance in HTML file 16 | //THM.cssBasic = "https://pushme-pullyou.github.io/tootoo14/js-14-03/style.css"; 17 | //THM.backgroundColor = "#eed" 18 | 19 | FOB.urlDefaultFile = "../../bookmarks.json"; 20 | 21 | POP.license = "../../../../license" 22 | 23 | // For main menu header 24 | MNU.helpFile = "../../README.md"; 25 | 26 | MNU.description = `Basic bookmark manager and editor with tagging, descriptions and comments`; 27 | 28 | MNU.urlSourceCode = "https://github.com/opentecture/mindmapping/tree/master/sandbox/opentecture-bookmarks"; 29 | 30 | MNU.homeText = "opentecture"; 31 | MNU.homeTitle = "Building to a common, scalable standard creates new opportunities to design and create objects and spaces in a collaborative way."; 32 | MNU.homeUrl = "https://www.opentecture.com/"; 33 | 34 | MNU.repoText = "mindmapping"; 35 | MNU.repoTitle = "Mindmapping is a collection of basic plain-vanilla JavaScript scripts for idea management using GitHub pages, 3D and whatever else comes to mind"; 36 | MNU.repoUrl = "https://opentecture.github.io/mindmapping"; 37 | 38 | MNU.appText = "bookmarks"; 39 | MNU.appTitle = ""; //"Basic html content management script with sliding menu, css theme selection, Markdown to HTML, drag and drop file reading capability, access to frequently used pages and more"; 40 | MNU.appUrl = "https://opentecture.github.io/mindmapping/#sandbox/opentecture-bookmarks/README.md"; 41 | 42 | MNU.footerPopupUrl = "https://pushme-pullyou.github.io/tootoo14/"; 43 | MNU.footerTarget = "target=_blank"; 44 | MNU.footerIssues = "https://github.com/opentecture/mindmapping/issues"; 45 | 46 | 47 | COR.getBookmarksFilterByTagsToIgnore = function ( bookmarks ) { 48 | 49 | const tagsToIgnore = inpTagsIgnore.value.split( "," ); 50 | 51 | const filtered = bookmarks.filter( bookmark => { 52 | 53 | let remove = false; 54 | 55 | for ( let tag of tagsToIgnore ) { 56 | 57 | if ( bookmark.tags.includes( tag ) ) { 58 | 59 | remove = true; 60 | break; 61 | 62 | } 63 | 64 | } 65 | 66 | return remove === false; 67 | 68 | } ); 69 | //console.log( '', filtered.length ); 70 | 71 | return filtered; 72 | 73 | }; -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/archive/add-a-line-bookmarks-view/v-0-0-0/cor-core.js: -------------------------------------------------------------------------------- 1 | /* globals FIL */ 2 | /* jshint esversion: 6 */ 3 | /* jshint loopfunc: true */ 4 | 5 | /* 6 | 7 | Contains local overrides 8 | 9 | */ 10 | 11 | 12 | const COR = { 13 | "copyright": "Copyright 2019 Opentecture authors. MIT License", 14 | "date": "2019-06-22", 15 | "description": "core", 16 | "helpFile": "cor-core/README.md", 17 | "release": "0.0.0-0cor", 18 | }; 19 | 20 | 21 | 22 | THM.themeUrlStorage = 'addALineTheme'; // set for each instance in HTML file 23 | THM.cssBasic = "https://pushme-pullyou.github.io/tootoo14/js-14-03/style.css"; 24 | 25 | FOB.urlDefaultFile = "bookmarks.json"; 26 | 27 | FGA.urlGitHubPage = "https://pushme-pullyou.github.io/tootoo14/"; 28 | 29 | // For main menu header 30 | MNU.helpFile = "../README.md"; 31 | 32 | //MNU.description = `Very simple JavaScript files to help you explore and build new tools on GitHub.`; 33 | 34 | MNU.urlSourceCode = "https://github.com/opentecture/mindmapping/tree/master/sandbox/opentecture-bookmarks"; 35 | 36 | MNU.homeText = "opentecture"; 37 | MNU.homeTitle = "Building to a common, scalable standard creates new opportunities to design and create objects and spaces in a collaborative way."; 38 | MNU.homeUrl = "https://www.opentecture.com/"; 39 | 40 | MNU.repoText = "mindmapping"; 41 | MNU.repoTitle = "Mindmapping is a collection of basic plain-vanilla JavaScript scripts for idea management using GitHub pages, 3D and whatever else comes to mind"; 42 | MNU.repoUrl = "https://opentecture.github.io/mindmapping"; 43 | 44 | MNU.appText = ""; // "CMS"; 45 | MNU.appTitle = ""; //"Basic html content management script with sliding menu, css theme selection, Markdown to HTML, drag and drop file reading capability, access to frequently used pages and more"; 46 | MNU.appUrl = ""; //"https://pushme-pullyou.github.io/#tootoo-templates/hamburger-theme-cms/README.md"; 47 | 48 | MNU.footerPopupUrl = "https://pushme-pullyou.github.io/"; 49 | MNU.footerTarget = "target=_blank"; 50 | MNU.footerIssues = "https://github.com/pushme-pullyou.github.io/tootoo14/issues"; 51 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/archive/add-a-line-bookmarks-view/v-0-0-0/js/bm-bookmarks.js: -------------------------------------------------------------------------------- 1 | /* global FOB, TAG, BLBF, crypto */ 2 | /* jshint esversion: 6 */ 3 | /* jshint loopfunc: true */ 4 | 5 | 6 | const BM = { 7 | 8 | "copyright": "Copyright 2019 poentecture authors. MIT License", 9 | "date": "2019-06-22", 10 | "description": "Display data of bookmark selected from left menu or drag & drop a link into this box", 11 | "version": "0.0.0-0", 12 | 13 | }; 14 | 15 | 16 | BM.getBookmarks = function () { 17 | //console.log( '', FOB.text ); 18 | 19 | 20 | BM.lines = FOB.text.split(/\r\n|\n/); 21 | 22 | BM.jsonLines = []; 23 | 24 | for ( let line of BM.lines ) { 25 | //console.log( 'line', line ); 26 | 27 | if ( line.slice( 0, 1 ) !== "{" ) { continue; } 28 | 29 | const jsonl = JSON.parse( line ); 30 | //console.log( 'jsonl', jsonl ); 31 | 32 | BM.jsonLines.push( jsonl ); 33 | 34 | } 35 | 36 | 37 | const comments = BM.lines.filter( line => line.includes( `"type":"comment"` ) ); 38 | //console.log( 'comments', comments ); 39 | 40 | BM.comments = comments.map( comment => JSON.parse( comment ) ) || ""; 41 | 42 | //BM.setBookmarks(); 43 | 44 | BBF.setMenuItemsByUrl(); 45 | 46 | }; 47 | 48 | 49 | BM.setBookmarks = function ( bookmarks = BM.jsonLines ) { 50 | 51 | const a = document.createElement( 'a' ); 52 | const subdomains = ["www.", "m.", "en." ]; 53 | 54 | htm = ""; 55 | 56 | for ( let bookmark of bookmarks ) { 57 | 58 | if ( bookmark.type === "url" ) { 59 | 60 | a.href = bookmark.url; 61 | let site = a.hostname; 62 | 63 | const subdomain = subdomains.filter( bit => site.startsWith( bit ) === true ); 64 | //console.log( 'subdomain', subdomain ); 65 | 66 | site = site.replace ( subdomain, "" ); 67 | //console.log( 'site', site ); 68 | 69 | const comment = BM.comments.find( comment => comment.bookmarkId === bookmark.id ) || ""; 70 | //console.log( 'comment', comment ); 71 | 72 | htm += 73 | `

74 | 75 | 76 | ${ bookmark.name } - ${ site } 77 |
78 | tags: ${ bookmark.tags } - added: ${ bookmark.dateAdd.slice( 0, 10 ) }
79 | ${ bookmark.description.startsWith ("No description" ) ? "" : bookmark.description } 80 |

${ comment.text || "" }

81 |

`; 82 | 83 | } 84 | 85 | } 86 | 87 | divContents.innerHTML = htm; 88 | 89 | }; -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/archive/add-a-line-bookmarks-view/v-0-0-0/popup.md: -------------------------------------------------------------------------------- 1 | ### Pop-Up menu as splash screen 2 | 3 | Hello, world! 4 | 5 | Click anywhere outside this popup to hide 6 | 7 | Press Control-Shift-J|Command-Option-J to see if the JavaScript console reports any errors 8 | 9 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/index.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Open Index or Markdown 6 | 7 | 8 | 9 | 10 | 18 | 19 | 20 | 21 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/utilities/html-frame-test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /sandbox/opentecture-bookmarks/utilities/tags-manage/tags-manage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 11 | 12 | 13 | 14 |

tags manage

15 | 16 |

17 | 18 | 19 | 20 |

21 | 22 | 23 | 24 | 95 | 96 | -------------------------------------------------------------------------------- /svg/noun_512565_cc.svg: -------------------------------------------------------------------------------- 1 | 018.ExplodeCreated with Sketch.Created by Creaticca Creative Agencyfrom the Noun Project -------------------------------------------------------------------------------- /templates/README-template.md: -------------------------------------------------------------------------------- 1 | 2 | [You are now in a GitHub source code view - click this link to view Read Me file as a web page]( https://opentecture.github.io/#mindmapping/xxxxx/README.md "View file as a web page." ) 3 | 4 |
6 | 7 |
8 | 9 | # [ZZZZZ Read Me]( #xxxxx/README.md ) 10 | 11 | 17 | 18 | 19 | ## Concept 20 | 21 | 22 | ## To Do / Wish List 23 | 24 | 25 | ## Issues 26 | 27 | 28 | 29 | ## Links of Interest 30 | 31 | 32 | ## Change Log 33 | 34 | ### 35 | 36 | * First commit 37 | 38 | 39 | *** 40 | 41 | #
42 | -------------------------------------------------------------------------------- /templates/README.md: -------------------------------------------------------------------------------- 1 | 2 | [You are now in a GitHub source code view - click this link to view Read Me file as a web page]( https://pushme-pullyou.github.io/#tootoo-templates/README.md "View file as a web page." ) 3 | 4 |
6 | 7 |
8 | 9 | # [Templates Read Me]( #README.md ) 10 | 11 | 16 | 17 | 18 | ## Concept 19 | 20 | Files you can build upon 21 | 22 | ## Files 23 | 24 | ### [Three.js Basic Template]( https://opentecture.github.io/mindmapping/#templates/threejs-basic.html ) 25 | 26 | * Very elementary file just to get something simple started 27 | * Useful for developer-facing cookbook/sandbox code samples 28 | * Loads Three.js renderer, scene, camera and controls 29 | * Adds axes helper and cube 30 | * Handles screen being resized 31 | * Sets uo requestanimationframe 32 | * Verified by 33 | * https://validator.w3.org/#validate_by_input 34 | * http://jshint.com/ 35 | * https://zz85.github.io/mrdoobapproves/ 36 | 37 | ### [Read Me Template]( https://opentecture.github.io/mindmapping/#templates/README-template.md ) 38 | 39 | * Most every folder should have a read me file 40 | * This file can provide you with a demo or boilerplate 41 | 42 | ## Links of Interest 43 | 44 | 45 | ## Change Log 46 | 47 | ### 2018-06-25 ~ Theo 48 | 49 | * Add threejs-basic.html 50 | 51 | 52 | *** 53 | 54 | 55 | #
56 | -------------------------------------------------------------------------------- /templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /templates/latest.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /templates/readme-template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /templates/readme.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 50 | 51 | 52 | --------------------------------------------------------------------------------