「location.hrefが信用出来ない問題」 http://hoge.com%2F@example.com/へアクセスした場合にlocation.hrefがhttp://hoge.com/@example.com/を返す (勝手にデコードされている) location.href = location.hrefで別のページに飛ぶ iOS 6.0未満、Android4.1未満の標準ブラウザで再現 Masato Kinugawa Security Blog: location.hrefの盲点 「location.hrefが信用出来ない問題」 location.hrefに@使ってなにか入れるのは普通にできる (http://hoge:huga@example.com/のlocation.hrefはhttp://hoge:huga@example.com/) location.hrefを独自解析
Moment.js 2.30.1 Parse, validate, manipulate, and display dates and times in JavaScript. Install npm install moment --save # npm yarn add moment # Yarn spm install moment --save # spm meteor add momentjs:moment # meteor bower install moment --save # bower (deprecated) Format Dates moment().format('MMMM Do YYYY, h:mm:ss a'); moment().format('dddd'); moment().format("MMM Do YY"); moment().format('YY
2013/08/01 一歩進んだHTML/CSS/JSを目指すために 「なんとなく書きたくないけど、どう意識してコーディングしていけばいいのかわからない…。」 それを解消するためのツールがありますので、紹介します。 HTMLInspector philipwalton/html-inspector Introducing HTML Inspector こちらはHTMLを解析して悪いところを指摘してくれるツール。 たぶんガイドラインとかそれぞれあると思いますが、基本的にはコレに沿ってもいいかと。 スクリプトを差し込んで、実行すると、指摘事項がconsoleに出力されます。 githubのリポジトリからダウンロードするか、bowerで落としてくるか。 bower install html-inspector 次に、解析したいページに以下のコードを埋め込みます。 <script s
こんにちは、中川です。 ここ1・2年ですが、私の担当するプロジェクトでは、 PHPよりもJavaScriptの開発が多い状態が続いております。 JSのプロジェクトを重ねるにつれ、開発環境も段々と整理されてきましたので、 一旦、最近のJS開発で利用しているライブラリやツールなどをまとめてみました。 フレームワーク ●Backbone.js http://backbonejs.org/ JavaScriptのMVCフレームワーク。 何も使わない(もしくは我流)よりは、これを使って欲しいと思えるフレームワークです。 利用者が多く日本語情報も豊富にあるのと、フレームワーク自体が1500行程度と軽量なため、学習コストを低く抑えることができます。 ●AngularJS http://angularjs.org/ データバインディングを備えたフレームワーク。 高機能なテンプレートや、DIの仕組み、ルーテ
Sarana Terbaik untuk Daftar Slot Online – Pencinta slot online tentu menginginkan pengalaman berjudi yang menyenangkan dan menguntungkan. Namun, dengan begitu banyak pilihan game slot yang tersedia, daftar slot online yang tepat bisa menjadi langkah awal yang penting. Inilah mengapa kami hadir untuk memberikan rekomendasi slot gacor gampang menang dari berbagai provider terpercaya. Setiap pemain…
前回の記事(setTimeoutとUIスレッドを学ぶよ JS Advent Calendar, オレ標準コース)で紹介したUIスレッドの概念でアニメーションをみてみる。 前回の復習 UIスレッド UIスレッドとはjsとUIの更新が行われるプロセスのことである。 UIスレッドはただのキューイングシステムでプロセスがアイドル状態になるまでタスクを保持する。 プロセスがアイドル状態になったら次のタスク(UI更新やjsの実行)をキューから取り出して逐次的に実行していくものである。 これをもとにアニメーションがいかに描画されているのかをみてみる。 今回はこんな感じのアニメーションについて。 【demo】 http://jsfiddle.net/nazomikan/7RJWU/ (function (win, doc) { var run = doc.getElementById('run'), //
<g> <g> <defs> <rect id="SVGID_1_" x="-468" y="-1360" width="1440" height="3027" /> </defs> <clippath id="SVGID_2_"> <use xlink:href="#SVGID_1_" style="overflow:visible;" /> </clippath> </g> </g> <rect x="-468" y="-1360" class="st0" width="1440" height="3027" style="fill:rgb(0,0,0,0);stroke-width:3;stroke:rgb(0,0,0)" /> <path d="M13.4,12l5.8-5.8c0.4-0.4,0.4-1,0-1.4c-0.4-0.4-1-0.4-1.4,0L12,10.6L6.2
Evernoteに任意のHTMLを注入できる脆弱性がありました。 http://togetter.com/li/125281 Evernoteのセキュリティポリシーとかには触れず、とりあえず何が可能だったのか、どういう状況だったのかを書きます。 4/18 16時ごろ Evernoteの登録ページのHTMLに以下のような記述があります。 <script type="text/javascript"> $(document).ready(function() { suggestedTags = []; suggestedNotebook = ""; sourceUrl = ""; providerName = ""; payload = { "user" : { ... }, ..後略.. </script> このsourceUrl = ""の部分、https://www.evernote.c
Like Underscore, but lazier Tweet +1 Lazy.js is a functional utility library for JavaScript, similar to Underscore and Lodash, but with a lazy engine under the hood that strives to do as little work as possible while being as flexible as possible. It has no external dependencies, so you can get started right away with:
Hello, dear readers! My name is Max Hilton, and I’m happy to welcome you to my blog dedicated to modular JavaScript utilities. I started this blog to share my JavaScript knowledge and experience to help you become more productive and efficient developers. Learn More What problems modularity solves Javascript is by far the most popular language in the world and is used now … yes where it is not onl
1 pixel|サイバーエージェント公式クリエイターズブログ サイバーエージェントのクリエイターの取り組みを紹介するオフィシャルブログです。最新技術への挑戦やサービス誕生の裏話、勉強会やイベントのレポートなどCAクリエイターの情報が満載です。
チラ裏。 普通に書くときはこんな感じ。 (function(global) { // ... ... })(this); thisはブラウザの場合はwindowになるけど、オブジェクトに依存しない処理ならオブジェクト名を書かないほうがよいんではないか。 windowオブジェクトに依存する場合は (function(global, window) { var document = window.document, location = window.location; // ... ... })(this, window); と、敢えて分けて書く。上のやつと合わせるって感じ。 undefinedを書いておきたいときは、 (function(global, undefined) { // ... ... })(this); と書きたいんだが、JSLintが引数の変数名に予約語使うな!って言って
JavaScript で、画像本来のサイズ(幅, 高さ)を取得する方法 - latest log JavaScriptで画像のサイズ(幅,高さ)をとる方法があって詳しく紹介されていて分かりやすいです。 ここで、画像のリンク切れをチェックする方法が書かれていなかったので書いてみます。 var img = new Image(); var url = '//phpspot.org/blog/img/notfound.jpg'; // あえて存在しない画像を指定 img.onload = function() { alert('width='+img.width+' , height='+img.height); }; img.onerror = function() { alert(url+' is dead'); }; img.src = url; 赤文字の部分を記述しておけば、エラー時に
Available free for open-source reading below or for purchase via the O'Reilly store. Pull requests and comments always welcome. Prelude Not so long ago, “data-rich web application” was an oxymoron. Today, these applications are everywhere and you need to know how to build them. Traditionally, web applications left the heavy-lifting of data to servers that pushed HTML to the browser in complete pag
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く