移除ptt 網頁版的imgur 圖片的外框 - gists · GitHub
文章推薦指數: 80 %
移除ptt 網頁版的imgur 圖片的外框. ... @name ptt imgur embed. // @namespace gist.github.com/dk00. // @include https://www.ptt.cc/bbs/*.html. Skiptocontent Allgists BacktoGitHub Signin Signup Sign in Sign up {{message}} Instantlysharecode,notes,andsnippets. dk00/ptt-imgur.user.js LastactiveAug31,2019 Star 0 Fork 0 Star Code Revisions 6 Embed Whatwouldyouliketodo? Embed Embedthisgistinyourwebsite. Share Copysharablelinkforthisgist. Clonevia HTTPS ClonewithGitorcheckoutwithSVNusingtherepository’swebaddress. LearnmoreaboutcloneURLs DownloadZIP 移除ptt網頁版的imgur圖片的外框 Raw ptt-imgur.user.js ThisfilecontainsbidirectionalUnicodetextthatmaybeinterpretedorcompileddifferentlythanwhatappearsbelow.Toreview,openthefileinaneditorthatrevealshiddenUnicodecharacters. LearnmoreaboutbidirectionalUnicodecharacters Showhiddencharacters //==UserScript== //@namepttimgurembed //@namespacegist.github.com/dk00 //@includehttps://www.ptt.cc/bbs/*.html //@includehttps://www.ptt.cc/man/*.html //@version0.0.3 //@licenseUnlicense //@compatible firefox //@compatible chrome //@run-atdocument-start //==/UserScript== consth=(tag,props)=>Object.assign(document.createElement(tag),props) constpreventScript=test=>event=> test(event.target.src)&&event.preventDefault() constisImgurScript=name=>/imgur.com/.test(name) document.addEventListener('beforescriptexecute',preventScript(isImgurScript)) try{//ifnobeforescriptexecute unsafeWindow.imgurEmbed={createIframe:()=>void8} }catch(e){} document.addEventListener('DOMContentLoaded',main) constentry='.imgur-embed-pub' constimgurURL=node=>{ constlink=node.parentElement.previousElementSibling return(link.href||link.querySelector('a').href).replace('http:','https://') } constensureSuffix=url=>/\.(jpe?g|png)$/.test(url)?url:url+'.jpg' functionrepaste(node){ node.parentElement.appendChild(h('img',{ src:ensureSuffix(imgurURL(node)), referrerPolicy:'no-referrer' })) } functionmain(){ Array.from(document.querySelectorAll(entry)).forEach(repaste) } Raw ptt.css ThisfilecontainsbidirectionalUnicodetextthatmaybeinterpretedorcompileddifferentlythanwhatappearsbelow.Toreview,openthefileinaneditorthatrevealshiddenUnicodecharacters. LearnmoreaboutbidirectionalUnicodecharacters Showhiddencharacters .bbs-content{ font-family:monospace; } Signupforfree tojointhisconversationonGitHub. Alreadyhaveanaccount? Signintocomment Youcan’tperformthatactionatthistime. Yousignedinwithanothertaborwindow.Reloadtorefreshyoursession. Yousignedoutinanothertaborwindow.Reloadtorefreshyoursession.
延伸文章資訊
- 1熱門看板 - PTT網頁版
- 2PTT Web
PTT網頁板的主要功能是幫助廣大的網路使用者一起來體驗獨特的PTT文化,在這裡您可以掌握最新資訊,並看到鄉民們精采的言論。本站不需下載程式即可瀏覽,且盡量讓版面 ...
- 3批踢踢- 维基百科,自由的百科全书
批踢踢實業坊,簡稱批踢踢、PTT,是一個臺灣電子佈告欄(BBS),採用Telnet BBS技術運作,建立在台灣學術網路的資源之上,以學術性質為原始目的,提供線上言論空間。
- 4PTT網頁版
PTT網頁版- 最佳的PTT網頁版使用體驗。提供方便的網頁使用界面。即時更新,隨時關注PTT上的最新動態。具有即時熱門看板, 我的收藏等功能。(PTTweb)
- 5批踢踢實業坊
使用網頁版終端機連線至批踢踢實業坊-- 以學術性質為目的,提供各專業學生實習的平台,而以電子佈告欄系統為主的一系列服務。期許在網際網路上建立起一個快速、即時、 ...