diff --git a/src/focus/focus.js b/src/focus/focus.js index 3c2086c0f..177532ce5 100644 --- a/src/focus/focus.js +++ b/src/focus/focus.js @@ -187,15 +187,18 @@ var storage = require( "storage" ).storage, * @param {string} include 'add' and 'delete' */ function includeStyle( $target, style, cls, type ) { - var bakstyle; - if ( type === "add" ) { - bakstyle = $target.attr( "style" ) == undefined ? "" : $target.attr( "style" ); - $target.attr( "style", bakstyle + style ).addClass( cls ); - } else if ( type === "delete" ) { - bakstyle = $target.attr( "style" ); - bakstyle = bakstyle.replace( style, "" ); - $target.attr( "style", bakstyle ).removeClass( cls ); - } + $target.each(function(index){ + var bakstyle; + var selector = $(this); + if ( type === "add" ) { + bakstyle = selector.attr( "style" ) == undefined ? "" : selector.attr( "style" ); + selector.attr( "style", bakstyle + style ).addClass( cls ); + } else if ( type === "delete" ) { + bakstyle = selector.attr( "style" ); + bakstyle = bakstyle.replace( style, "" ); + selector.attr( "style", bakstyle ).removeClass( cls ); + } + }); } /** diff --git a/src/service/config.js b/src/service/config.js index f2a18bc29..ae700d3d0 100644 --- a/src/service/config.js +++ b/src/service/config.js @@ -64,10 +64,12 @@ const readItems = { "color": "#D4237A", "items": { "pdf" : { + "name" : "导出为 PDF", "icon" : ss.IconPath("pdf_icon"), "color": "#D4237A", }, "png" : { + "name" : "导出为 PNG", "icon" : ss.IconPath("png_icon"), "color": "#D4237A", },