5%up
by
esper
2012-03-10 [2012/03/10 09:18:39]
(Forked from
選択範囲を取得 by
Cside)
5%up selected text
@@ -1,17 +1,15 @@
/*
- * @title 選択範囲を取得
- * @description 選択範囲を取得
+ * @title 5%up
+ * @description 5%up selected text
* @include http://*
* @license MIT License
+ * @require
+ */
-*/
-
-(function(){
- var selection
+var selection
= window.getSelection ? window.getSelection()
: document.getSelection ? document.getSelection()
: document.selection ? document.selection.createRange().text
: 0
;
- console.log(encodeURIComponent(selection));
-})();
+alert(parseInt( selection.getRangeAt(0) )*1.05);
/*
* @title 5%up
* @description 5%up selected text
* @include http://*
* @license MIT License
* @require
*/
var selection
= window.getSelection ? window.getSelection()
: document.getSelection ? document.getSelection()
: document.selection ? document.selection.createRange().text
: 0
;
alert(parseInt( selection.getRangeAt(0) )*1.05);
- Permalink
- このページへの個別リンクです。
- RAW
- 書かれたコードへの直接のリンクです。
- Packed
- 文字列が圧縮された書かれたコードへのリンクです。
- Userscript
- Greasemonkey 等で利用する場合の .user.js へのリンクです。
- Loader
- @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
- Metadata
- コード中にコメントで @xxx と書かれたメタデータの JSON です。