Want to create a Gist from your editor, the command line, or the Services menu? Here's how.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module['exports'] = function markdownHook (hook) { | |
var marked = require('marked'); | |
// TODO: expose parser options through schema | |
marked.setOptions({ | |
renderer: new marked.Renderer(), | |
gfm: true, | |
tables: true, | |
breaks: false, | |
pedantic: false, | |
sanitize: true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// applicationCacheの更新を妨害する | |
Object.defineProperty(this,'applicationCache',{get:function(){return{}}}); | |
(function () { | |
// AppCache上でlocation.hrefを読み込むとAppCacheの内容を読み込むため、「ブラウザは別URLと認識するが、サーバは同じコンテンツを返すURL」を作る | |
contentLoad(location.href+'/'); | |
// 本来であればsubmit等のイベントもキャッチする必要がある | |
window.addEventListener('click', function (evn) { | |
var elem = evn.target; | |
while (elem.tagName.toLocaleLowerCase() != 'a') elem = elem.parentNode; |