Last active
October 20, 2016 07:58
-
-
Save synr/abc87ea3c0ca5ae6d667de8aff36c447 to your computer and use it in GitHub Desktop.
[取得 Markdown 格式的連結並傳到 Trello (壓縮板、指定傳Trello)]get markdown link format to save web to trello.com
This file contains 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
javascript:(function(){for(var b='',c=document.getElementsByTagName('link'),a=c.length;a--;)'shortlink'==c[a].rel&&(b=c[a].href);-1!=location.href.indexOf('//www.youtube.com/watch?')&&(b=location.href.replace(/.*youtube\.com\/watch\?v=(.*)\&(.*)/,'https://youtu.be/$1?$2'));if(-1!=location.href.indexOf('//www.pixiv.net/member.php?id='))for(c=document.getElementsByTagName('input'),a=c.length;a--;)if(/http\:\/\/pixiv\.me\/.*/.test(c[a].value)){b=''==b?c[a].value:b;break}if(-1!=location.href.indexOf('//www.pixiv.net/member_illust.php?'))for(var c= document.getElementsByTagName('link'),a=c.length,d=0<document.getElementsByTagName('html')[0].lang.length?document.getElementsByTagName('html')[0].lang:'';a--;)if('en'==c[a].hreflang){b=''==b?c[a].href.replace(/www(\.pixiv\.com)/,d+'$1'):b;break}if(-1!=location.href.indexOf('//dic.nicovideo.jp'))for(c=document.getElementsByTagName('a'),a=c.length;a--;)if(/.*\/id\/(\d+)/.test(c[a].href)){b=''==b?c[a].href.replace(/.*\/id\/(\d+)/,'http://nico.ms/dic/$1'):b;break}d=(''==b?location.href.replace(/https?\:\/\/www\.nicovideo\.jp\/watch\//, 'http://nico.ms/').replace(/https?\:\/\/seiga\.nicovideo\.jp\/(seiga|watch)\//,'http://nico.ms/').replace(/https?\:\/\/live\.nicovideo\.jp\/watch\//,'http://nico.ms/').replace(/https?\:\/\/com\.nicovideo\.jp\/community\//,'http://nico.ms/').replace(/https?\:\/\/ch\.nicovideo\.jp\/.*\/blomaga\/(ar.*)/,'http://nico.ms/$1').replace(/https?\:\/\/chokuhan\.nicovideo\.jp\/products\/detail\/(\d*)/,'http://nico.ms/nd$1').replace(/https?\:\/\/ichiba\.nicovideo\.jp\/item\/(az.*)/,'http://nico.ms/$1').replace(/https?\:\/\/ichiba\.nicovideo\.jp\/item\/(ysamiami.*)/, 'http://nico.ms/$1').replace(/https?\:\/\/ichiba\.nicovideo\.jp\/item\/(ggbo.*)/,'http://nico.ms/$1').replace(/https?\:\/\/ichiba\.nicovideo\.jp\/item\/(ndsupplier.*)/,'http://nico.ms/$1').replace(/https?\:\/\/ichiba\.nicovideo\.jp\/item\/(dw.*)/,'http://nico.ms/$1').replace(/https?\:\/\/ichiba\.nicovideo\.jp\/item\/(it.*)/,'http://nico.ms/$1').replace(/https?\:\/\/app\.nicovideo\.jp\/app\/(ap.*)/,'http://nico.ms/$1').replace(/https?\:\/\/jk\.nicovideo\.jp\/watch\/(jk.*)/,'http://nico.ms/$1').replace(/https?\:\/\/commons\.nicovideo\.jp\/material\/(nc.*)/, 'http://nico.ms/$1').replace(/https?\:\/\/news\.nicovideo\.jp\/watch\/(nw.*)/,'http://nico.ms/$1').replace(/https?\:\/\/www\.nicovideo\.jp\/(user\/\d*)/,'http://nico.ms/$1').replace(/https?\:\/\/www\.nicovideo\.jp\/(mylist\/\d*)/,'http://nico.ms/$1').replace(/https?\:\/\/www\.nicovideo/,'http://nicovideo').replace(/https?\:\/\/www\.facebook\.com/,'http://fb.com').replace(/https?\:\/\/www\.pixiv\.net\/member\.php\?id\=/,'http://p.tl/m/').replace(/https?\:\/\/www\.pixiv/,'http://pixiv').replace('http://bangumi.tv', 'http://bgm.tv').replace(/https?\:\/\/www\.bilibili\.com/,'http://acg.tv').replace(/(https?:\/\/trello\.com\/(c|b)\/.*)\/.*/,'$1').replace(/(https?)\:\/\/www\.plurk/,'$1://plurk').replace(/(https?)\:\/\/www\.playpcesor/,'$1://playpcesor').replace(/:\/\/.*\.(googledrive\.com.{0,})/,'://$1'):b)+'';b=document.title.replace(/( - \u30cb\u30b3\u30cb\u30b3\u52d5\u753b:GINZA| \u2010 \u30cb\u30b3\u30cb\u30b3\u52d5\u753b:GINZA| \u2010 niconico\u52d5\u756b:GINZA| - Niconico Douga: Ginza)/,'').replace(/( - \u54d4\u54e9\u54d4\u54e9 - \( \u309c- \u309c\)\u3064\u30ed \u4e7e\u676f~ - bilibili| - \u55f6\u54e9\u55f6\u54e9 - \( \u309c- \u309c\)\u3064\u30ed \u4e7e\u676f~ - bilibili)/, '').replace(/\[/g,'\\[').replace(/\]/g,'\\]').replace(/\./g,'\\.').replace(/http\:/g,'http\\:').replace(/https\:/g,'https\\:').replace(/\_/g,'\\_').replace(/\#/g,'\\#').replace(/\*/g,'\\*');navigator.userAgent.match('MSIE');console.log(void 0);var e=getSelection?getSelection().toString():'';-1!=location.href.indexOf('//www.youtube.com/watch?')&&(d=location.href);c=d;a=window;d=encodeURIComponent('- ['+b+']('+d+')')+(e?encodeURIComponent('\n\n----\n\n ```\n'+e+'\n```'):'');a.open('https://trello.com/add-card?source='+ a.location.host+'&mode=popup&url='+encodeURIComponent(c)+(b?'&name='+encodeURIComponent(b):'')+'&desc='+d,'add-trello-card','width=500,height=600,left='+(a.screenX+(a.outerWidth-500)/2)+',top='+(a.screenY+(a.outerHeight-740)/2))})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment