// ==UserScript== // @name mt-Tool::Make CF Value list // @description Movable Type のカスタムフィールドの項目と値のリストを生成します // @include http://* // ==/UserScript== /* * @title mt-Tool::Make CF Value list * @description Movable Type のカスタムフィールドの項目と値のリストを生成します * @include http://* * @license MIT License * @require * @javascript_url * @private */ // for Movable Type 6.x // Checked ver. 6.0.6 (function($){ // get custom field value $('body#edit_field').each(function () { var f_objType = { 'システムオブジェクト': $('#obj_type').parent('div').text().replace(/[\s\r\n]+/g, '') }; var f_name = { '名前': $('#name').val() }; var f_desc = { '説明': $('#description').val() }; var f_type = { '種類': $('#type-label').parent().next().text().replace(/[\s\r\n]+/g, '') }; var f_option = { 'オプション': $('#options').val() || 'なし' }; var f_require = { '必須': $('#required').attr('checked') === 'checked' ? '必須' : '必須でない' }; var f_default = { '規定値': $('#default-field').text().replace(/[\s\r\n]+/g, '') }; var f_basename = { 'ベースネーム': $('span.basename-text').text() }; var f_tmplTag = { 'テンプレートタグ': $('#tag').val() }; var result = []; result.push(f_objType); result.push(f_name); result.push(f_desc); result.push(f_type); result.push(f_option); result.push(f_require); result.push(f_default); result.push(f_basename); result.push(f_tmplTag); // out $('body').append('
'); $.each(result, function () { for (var key in this) { for (var i = 0; i < result.length; i++) { var dlist = $('