標籤
.net
(
17
)
工作
(
29
)
面試
(
2
)
筆記
(
2
)
筆記倉庫
(
1
)
嘸蝦米
(
2
)
繪圖
(
1
)
Add-on
(
4
)
Android
(
39
)
AngularJS
(
1
)
ASP.NET
(
14
)
AutoHotKey
(
20
)
AutoIt
(
3
)
batch
(
24
)
Blogger Hack
(
3
)
Bookmarklet
(
18
)
C#
(
16
)
Chrome
(
1
)
cmd
(
22
)
CSS
(
6
)
CSS3
(
6
)
D855
(
1
)
DOM
(
17
)
DragOnIt
(
5
)
EmEditor
(
1
)
English
(
1
)
ffmpeg
(
1
)
Firefox
(
25
)
flo
(
2
)
GIMP
(
1
)
gist
(
144
)
Graphviz
(
1
)
hardware
(
1
)
HDD
(
1
)
HTML5
(
4
)
i18n
(
1
)
IIS
(
4
)
ImageMagick
(
5
)
Java
(
1
)
JavaScript
(
92
)
jhead
(
1
)
jQuery
(
6
)
JSBin
(
19
)
jsFiddle
(
4
)
JSON
(
1
)
JustDoubleClick
(
1
)
Kindle
(
1
)
MSSQL
(
26
)
MySQL
(
2
)
Network
(
1
)
node.js
(
12
)
php
(
1
)
PowerShell
(
6
)
ramdisk
(
1
)
Reg
(
3
)
RegExp
(
3
)
rpi3
(
3
)
SJ2000
(
1
)
SQLite
(
3
)
SSD
(
1
)
Stylish
(
1
)
SublimeText
(
2
)
tips
(
6
)
userChrome.js
(
3
)
userscript
(
40
)
VB.net
(
9
)
VBScript
(
2
)
VisualStudio
(
2
)
Vue.js
(
3
)
Win
(
5
)
Win2008
(
1
)
Win7
(
29
)
WinAPI
(
1
)
Winform
(
1
)
WinXP
(
3
)
XML
(
1
)
Youtube Popup Player
標籤:
Bookmarklet
,
gist
Youtube Popup Player
Youtube Popup Player
Firefox如果無法彈出,請設定about:config
browser.link.open_newwindow.restriction
值:整數 (Integer)
新連結開啟於分頁或新視窗
解除禁止選取
標籤:
Bookmarklet
javascript: (function () {
function R(a) {
ona = "on" + a;
if (window.addEventListener) window.addEventListener(a, function (e) {
for (var n = e.originalTarget; n; n = n.parentNode) n[ona] = null;
}, true);
window[ona] = null;
document[ona] = null;
if (document.body) document.body[ona] = null;
}
function userSelect() {
var css = document.createElement("style");
css.type = "text/css";
document.getElementsByTagName("head")[0].appendChild(css);
css.innerHTML = "*{-moz-user-select:text!important}";
}
R("contextmenu");
R("click");
R("mousedown");
R("mouseup");
R("selectstart");
userSelect();
})()
Redirect to static HTML (Discuz!)
標籤:
Bookmarklet
適用於Discuz!論壇,從動態網頁轉至靜態網頁,AutoPagerize才有作用
javascript:
(function(){
var tid=/tid=(\d*)/.exec(location.search)[1];
var page=(/page=(\d*)/.test(location.search)[1])?/page=(\d*)/.exec(location.search)[1]:1;
location.assign('thread-'+tid+'-'+page+'-1.html');
}
)()
ReSize Imgs (AutoScale)
標籤:
Bookmarklet
javascript:
(function(){
var img=document.getElementsByTagName('img');
var MaxWidth=window.outerWidth*0.75;
var MaxHeight=800;
for(i=0;i<img.length;i++){
var HeightWidth=img[i].offsetHeight/img[i].offsetWidth;
var WidthHeight=img[i].offsetWidth/img[i].offsetHeight;
if(img[i].offsetWidth>MaxWidth){
img[i].width=MaxWidth;
img[i].height=MaxWidth*HeightWidth;
}
if(img[i].offsetHeight>MaxHeight){
img[i].height=MaxHeight;
img[i].width=MaxHeight*WidthHeight;
}
}
}
)()
ReSize Imgs (AutoScale)
FDZ Post Img(List)
標籤:
Bookmarklet
,
JavaScript
開啟新頁,並列出文章裡所有外連圖片
點擊圖片即可重新讀取圖片
FDZ Post Img(List)
Note:
強制重新載入圖片 | CFSOHO BLOG
點擊圖片即可重新讀取圖片
javascript: (function () {
var img = document.querySelectorAll("div[id^=postmessage] img"),
tmp = '';
for (var i = 0; i < img.length; i++) {
if (img[i].src.indexOf(location.host) == -1) tmp += '<img onclick=\"this.src=this.src + \'?\'+new Date().getTime();\" style=\"border:1pt solid #000;margin:5px 0;padding:5px\" src=\"' + img[i].src + '\"><br>';
}
var n = window.open('', '').document;
n.open();
n.write(tmp);
n.close();
})()
FDZ Post Img(List)
Note:
img.src=img.src+'?'+new Date().getTime(); //強制重新載入圖片,略過cache
強制重新載入圖片 | CFSOHO BLOG
Google字典
標籤:
Bookmarklet
在網頁中選取所要查詢的字串,再點擊本Bookmarklet
即可把所選取字串丟至Google字典查詢
P.S.連input、textarea都通吃了
Google字典
即可把所選取字串丟至Google字典查詢
P.S.連input、textarea都通吃了
javascript: (function () {
function getInputText() {
var it = document.getElementsByTagName('input');
for (var i = 0; i < it.length; i++) {
if (it[i].type == 'text') {
var startPos = it[i].selectionStart;
var endPos = it[i].selectionEnd;
if (startPos == endPos) {
return 0;
}
return it[i].value.substring(startPos, endPos);
}
}
return 0;
}
function getTextarea() {
var ta = document.getElementsByTagName('textarea');
for (var j = 0; j < ta.length; j++) {
if (ta[j].selectionStart != ta[j].selectionEnd) return ta[j].value.substring(ta[j].selectionStart, ta[j].selectionEnd);
}
return 0;
}
var s = document.getSelection();
if (s.length == 0) s = getInputText();
if (s == 0) s = getTextarea();
if (s == 0) s = prompt('Enter a vocabulary.', '');
if (s.length != 0) window.open('http://www.google.com.tw/dictionary?aq=f&langpair=en|zh-TW&q=' + s + '&hl=zh-TW');
})()
Google字典
使用Bookmarklet開啟新視窗並寫入原始碼
標籤:
Bookmarklet
- 把所要寫入的原始碼進行Compress HTML
- 壓縮後,把HTML屬性的雙引號(")取代成
\" - 接著,再把javascript裡的換行符號(\n)取代成
\\n - 補充,javascript裡的反斜線(\)取代成
\\ - 置入here的部份
var n = window.open("", "").document, c;
c = "here";
n.open();
n.write(c);
n.close(); - 取代完成後,把上述步驟所有程式碼使用Bookmarklet Builder製成Bookmarklet
Note:
- HTML使用
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
</body>
</html> - javascript撰寫部份使用單引號
- 步驟2、3、4皆在處理跳脫字元,可寫成巨集
Google Docs Viewer
標籤:
Bookmarklet
,
tips
網頁中的超連結如有包含.doc、.pdf、.tiff、.ppt、.docx、.pptx、.xls、.xlsx、.svg
將自動上色且點擊後使用Google Docs Viewer開啟
Google Docs Viewer
範例網頁
RegExp Object可以直接引用
View PDFs With Google Docs Viewer Bookmarklet [Update: Greasemonkey Script]
Bookmarklet for "Google Docs Viewer"
將自動上色且點擊後使用Google Docs Viewer開啟
javascript: (function () {
var link = document.links;
for (var i = 0; i < link.length; i++) {
if (/\.(doc|pdf|tiff|ppt|docx|pptx|xls|xlsx|svg)$/i.test(link[i].href)) {
link[i].href = 'http://docs.google.com/viewer?url=' + encodeURIComponent(link[i].href);
link[i].target = '_blank';
link[i].style.backgroundColor = '#00CC00';
link[i].style.color = '#FFF';
link[i].style.fontWeight = 'bold';
}
}
})()
Google Docs Viewer
範例網頁
RegExp Object可以直接引用
/\.(doc|pdf|tiff|ppt|docx|pptx|xls|xlsx|svg)$/i.test(link[i].href)
View PDFs With Google Docs Viewer Bookmarklet [Update: Greasemonkey Script]
Bookmarklet for "Google Docs Viewer"
訂閱:
文章
(
Atom
)