ソースを参照

Visual Editor fix (part one).

develop
Ben Kurtovic 8年前
コミット
bf1707b31f
1個のファイルの変更7行の追加2行の削除
  1. +7
    -2
      src/tfd.js

+ 7
- 2
src/tfd.js ファイルの表示

@@ -84,14 +84,19 @@ TFD.prototype._error = function(msg, extra) {
this._block_submit("error"); this._block_submit("error");
}; };


TFD.prototype._get_section_edit_tag = function() {
return this.head
.find(".mw-editsection a:not(.mw-editsection-visualeditor)").first();
};

TFD.prototype._get_discussion_page = function() { TFD.prototype._get_discussion_page = function() {
var url = this.head.find(".mw-editsection a").first().prop("href");
var url = this._get_section_edit_tag().prop("href");
var match = url.match(/title=(.*?)(\&|$)/); var match = url.match(/title=(.*?)(\&|$)/);
return match ? match[1] : null; return match ? match[1] : null;
}; };


TFD.prototype._get_section_number = function() { TFD.prototype._get_section_number = function() {
var url = this.head.find(".mw-editsection a").first().prop("href");
var url = this._get_section_edit_tag().prop("href");
var match = url.match(/section=(.*?)(\&|$)/); var match = url.match(/section=(.*?)(\&|$)/);
return match ? match[1] : null; return match ? match[1] : null;
}; };


読み込み中…
キャンセル
保存