/*
* @title Qiita diff+
* @description improvement diff view on Qiita
* @include http://qiita.com/Qiita/items/*
* @include http://qiita.com/Qiita_en/items/*
* @license MIT License http://opensource.org/licenses/MIT
* @javascript_url
*/
// e.g.
// http://qiita.com/Qiita/items/c686397e4a0f4f11683d/revisions/18
// http://qiita.com/Qiita_en/items/c170159cd313d982429e/revisions/1
(function () {
if (!/qiita.com$/.test(location.hostname) ||
!(location.pathname.split('/').indexOf('revisions') > -1)) { // ES7 Array|String#includes
return;
}
// TBD show diff only
// jump
var diff = document.querySelector('.remove, .add');
if (!diff) return;
diff.scrollIntoView();
})();