Chrome のRSS Subscription Extension で、
RSS のURL 文字列がエンコードされてしまい、
LDR に登録できない。
そこで、フィードリーダー設定にnoencode フラグを勝手に追加して、
subscribe.js:navigate() でフラグを判定するようにした。
extension のディレクトリ名は nlbjncdgjeocebhnmkbbbdekmmmcbfjd
以下、書き換えたところ
--- subscribe.js.orig 2011-01-29 16:58:50.000000000 +0900
+++ subscribe.js 2011-01-29 16:58:50.000000000 +0900
@@ -37,9 +37,14 @@
// Navigates to the reader of the user's choice (for subscribing to the feed).
function navigate() {
var select = document.getElementById('readerDropdown');
+ var noencode = feedReaderList[select.selectedIndex].noencode;
+ var furl = feedUrl;
+ if(! noencode) {
+ furl = encodeURIComponent(feedUrl);
+ }
var url =
feedReaderList[select.selectedIndex].url.replace(
- "%s", encodeURIComponent(feedUrl));
+ "%s", furl);
// Before we navigate, see if we want to skip this step in the future...
if (storageEnabled) {
--- options.html.orig 2011-01-29 16:58:50.000000000 +0900
+++ options.html 2011-01-29 16:58:50.000000000 +0900
@@ -220,12 +220,16 @@
// Adding a new item, make sure the text boxes are empty.
document.getElementById('urlText').value = "";
document.getElementById('descriptionText').value = "";
+ document.getElementById('urlNoenc').checked = false;
editingIndex = -1; // New item.
editingDefault = true; // New items become default items.
} else if (index == 0) {
// Editing some item, find the current item index and store it.
editingIndex = readerListbox.selectedIndex;
var oldOption = readerListbox.options[editingIndex];
+ var feedReaderList = JSON.parse(window.localStorage.readerList);
+ document.getElementById('urlNoenc').checked =
+ (feedReaderList[editingIndex].noencode) == 1;
document.getElementById('urlText').value = oldOption.value;
document.getElementById('descriptionText').value =
oldOption.text.replace(
@@ -299,13 +303,15 @@
var url = document.getElementById('urlText').value;
var description = document.getElementById('descriptionText').value;
-
+ var noencode = 0;
+ if(document.getElementById('urlNoenc').checked)
+ noencode = 1;
if (editingIndex == -1) {
// Construct a new list.
var newFeedList = [];
// Add the new item.
- newFeedList.push({ 'url': url, 'description': description });
+ newFeedList.push({ 'url': url, 'description': description, 'noencode':noencode });
for (i = 0; i < feedReaderList.length; ++i)
newFeedList.push(feedReaderList[i]);
@@ -314,6 +320,7 @@
} else {
feedReaderList[editingIndex].url = url;
feedReaderList[editingIndex].description = description;
+ feedReaderList[editingIndex].noencode = noencode;
}
window.localStorage.readerList = JSON.stringify(feedReaderList);
@@ -338,6 +345,7 @@
i18nReplace('rss_subscription_always_use_default');
i18nReplaceImpl('dialogHeader', 'rss_subscription_edit_dialog_title');
i18nReplace('rss_subscription_feed_description');
+ i18nReplace('rss_subscription_feed_noencode');
i18nReplace('rss_subscription_feed_url');
i18nReplaceImpl('save', 'rss_subscription_save_button', 'value');
i18nReplaceImpl('rss_subscription_close_button',
@@ -417,6 +425,15 @@
<div id="urlAssist" class="urlAssist"></div>
</div>
+ <div class="dialogRow">
+ <label for="urlNoenc">
+ <div id="rss_subscription_feed_noencode"></div>
+ </label>
+ <div>
+ <input type="checkbox" id="urlNoenc" value="1" onChange="validateInput()">
+ </div>
+ </div>
+
<div class="dialogRow" id="dialogContentFooter">
<div>
<input type="button" id="save"
--- _locales/ja/messages.json.orig 2011-01-29 16:58:50.000000000 +0900 +++ _locales/ja/messages.json 2011-01-29 16:58:50.000000000 +0900 @@ -118,5 +118,8 @@ }, "rss_subscription_unknown_feed_name": { "message": "\u30D5\u30A3\u30FC\u30C9\u540D\u304C\u4E0D\u660E\u3067\u3059" + }, + "rss_subscription_feed_noencode": { + "message": "\u30D5\u30A3\u30FC\u30C9\u306E URL \u3092\u30A8\u30F3\u30B3\u30FC\u30C9\u3057\u306A\u3044" } }
はじめてのGoogle Chrome―新機能満載!Webブラウザのインストールからカスタマイズまで! (I・O BOOKS) 本間 一 工学社 2009-12 売り上げランキング : 183299 Amazonで詳しく見る by G-Tools |
コメント