Scrapboxããã¸ã§ã¯ãå ã®ãã¼ã¸æ°ã®æ¨ç§»ãå¯è¦åãããã£ãï¼ä½æãããã®ã¯ Scrapbox ã®UserScriptã¨èªåã§çµãã ç°¡åãªã¦ã§ãã¢ããªã®2ãã¼ãããæãï¼ãã¾ãããã¨å°ç¨ã¬ãã¼ããã¼ã¸ã§ãã¼ã¸æ°ã®å¤åã®æãç·å³ã確èªã§ããï¼
以ä¸ã®ä¾ã§ã¯ã¾ã 3æ¥åã®ãã¼ã¿ãããªãã®ã§è¦æ ãã¯è¯ããªããï¼ä»å¾èç©ãã¼ã¿ãå¢ãã¦ãããã¨ã§ï¼ç´è¿30æ¥åã®ãã¼ã¸æ°ããããããããï¼
èªåã®ããã¸ã§ã¯ãã§ã®ä¾
ä»çµã¿
- ãã¼ã¸ä¸è¦§ç»é¢ã®å³ä¸ãã¼ã¸æ°ãã¯ãªãã¯ãã¦èªåã®ã¦ã§ãã¢ããªã«ä»¥ä¸ã®ãã¼ã¿ãéä¿¡
- ãã¼ã¸æ°
- ãã¼ãå (ä»å¾ï¼æãç·å³ã®ãã¶ã¤ã³ã§ä½¿ããã¨èãã¦ãã)
- ããã¸ã§ã¯ãå (URLã®ä¸é¨ã§ã¯ãªãï¼ç»é¢å·¦ä¸ã«è¡¨ç¤ºããã¦ãããã®)
- ã¦ã§ãã¢ããªã«ãã¼ã¿ãä¿åã»èç©
- ã¬ãã¼ããã¼ã¸ã«ã¢ã¯ã»ã¹ããããèç©ããããã¼ã¸æ°ã®æ¥å¥å¤åãæãç·å³ã§è¡¨ç¤º
æºå
ä¸è¨ã®ãã㪠UserScript ãèªåã®ãã¼ã¸ã®script.js
ã«è¿½å ï¼
var daiizPageCounter = function () { var dLog = { 'page': 0, 'theme': 'default', 'project': '' }; var $p = $('div.page-list-status-bar'); $p.on('click', function (e) { var $t = $(e.target).closest('div.page-list-status-bar'); dLog.page = +$t.text().match(/\d+/)[0]; dLog.project = $('#app-container').find('.navbar-brand > .title').text(); $.ajax({ 'url': 'https://daiiz-apps.appspot.com/sb/p/a', 'method': 'POST', 'dataType': 'json', 'data': JSON.stringify(dLog) }).done(function (data) {}); }); var $links = $('link'); for (var i = 0; i < $links.length; i++) { var href = $links[i].href; if (href.match(/\/themes\//) !== null) { dLog.theme = href.split('/themes/')[1].split('.css')[0]; break; } } $p.css({cursor: 'pointer'}); }; window.setTimeout(daiizPageCounter, 1000 * 3);
è¨é²æé
- Scrapboxããã¸ã§ã¯ãã®ãã¼ã¸ä¸è¦§ç»é¢ã§å³ä¸ã«è¡¨ç¤ºããã¦ããpagesæ¬ãã¨ãã©ãã¯ãªãã¯ããã ãã§è¯ãï¼
- ãã®æ°åãã¯ãªãã¯ããã¨ä¸è¿°ã®ãã¼ã¿ãèªåã®ã¦ã§ãã¢ããªã«éä¿¡ããã¦ï¼æ¥ä»æ å ±ãä»å ãã¦ä¿åãããï¼
- ã¦ã§ãã¢ããªå´ã®è¨å®ã¯ä¸è¦ã§ï¼ååãªã¯ã¨ã¹ãåä¿¡æã«èªåã§ãã¼ã¿èç©ã®æºåãæ´ãï¼ã¬ãã¼ããã¼ã¸ã«ã¢ã¯ã»ã¹ããããã®URL (ä¾: https://daiiz-apps.appspot.com/sb/p/daiiz) ãä½æãããï¼ã¬ãã¼ããã¼ã¸ã¯ï¼ããã¸ã§ã¯ãã® private / public ã«é¢ä¿ãªãï¼URLãç¥ã£ã¦ãã人ã誰ã§ãã¢ã¯ã»ã¹ã§ããï¼
- 1æ¥æä½1åã¯ãªãã¯ãã¦éä¿¡ããã°ï¼æ¯æ¥ã®ææ°ãã¼ã¸æ°ãä¿åãã¦ãããï¼
製ä½éå§æç¹ã¯GitHubã®èçãµãã®ãã¶ã¤ã³ã§å¯è¦åãããã¨æã£ããï¼Scrapboxã§ã¯æãç·å³ã®æ¹ãå¢ããè¦ãã¦è¯ãã ããã¨æããããªã£ãï¼