Repository: welefen/Fiddler Branch: master Commit: 9a604cf0a4de Files: 85 Total size: 18.3 MB Directory structure: gitextract_fd4ce_x1/ ├── .gitignore ├── Fiddler.pem ├── README.md ├── build.sh ├── clean.php ├── config.php ├── plugin/ │ ├── Info.plist │ ├── README.md │ ├── build_mac.sh │ ├── chrome_fiddler.mm │ ├── chrome_fiddler.plugin/ │ │ └── Contents/ │ │ ├── Info.plist │ │ └── MacOS/ │ │ └── chrome_fiddler │ ├── chrome_fiddler_plugin.cc │ ├── chrome_fiddler_plugin.h │ ├── chrome_fiddler_script_object.cc │ ├── chrome_fiddler_script_object.h │ ├── chrome_fiddler_vs2008_project/ │ │ ├── Debug/ │ │ │ ├── chrome_fiddler.exp │ │ │ ├── chrome_fiddler.ilk │ │ │ ├── chrome_fiddler.lib │ │ │ └── chrome_fiddler.pdb │ │ ├── Release/ │ │ │ ├── chrome_fiddler.exp │ │ │ ├── chrome_fiddler.lib │ │ │ └── chrome_fiddler.pdb │ │ ├── chrome_fiddler/ │ │ │ ├── chrome_fiddler.aps │ │ │ ├── chrome_fiddler.def │ │ │ ├── chrome_fiddler.rc │ │ │ ├── chrome_fiddler.vcproj │ │ │ └── resource.h │ │ ├── chrome_fiddler.ncb │ │ ├── chrome_fiddler.sln │ │ └── chrome_fiddler.suo │ ├── log.cc │ ├── log.h │ ├── np_entry.cc │ ├── npapi.h │ ├── npfunctions.h │ ├── npn_entry.cc │ ├── npp_entry.cc │ ├── npruntime.h │ ├── nptypes.h │ ├── plugin_base.cc │ ├── plugin_base.h │ ├── plugin_factory.cc │ ├── plugin_factory.h │ ├── script_object_base.cc │ ├── script_object_base.h │ ├── script_object_factory.cc │ ├── script_object_factory.h │ └── utils.h ├── src/ │ ├── bin/ │ │ └── chrome_fiddler.plugin/ │ │ └── Contents/ │ │ ├── Info.plist │ │ └── MacOS/ │ │ └── chrome_fiddler │ ├── css/ │ │ ├── lib/ │ │ │ ├── bootstrap.css │ │ │ ├── fiddler.css │ │ │ └── shCoreDefault.css │ │ ├── lib.css │ │ └── page/ │ │ └── options.css │ ├── html/ │ │ ├── background.html │ │ ├── devtools.html │ │ └── options.html │ ├── img/ │ │ └── icon.psd │ ├── js/ │ │ ├── component/ │ │ │ ├── config.js │ │ │ ├── event.js │ │ │ ├── file.js │ │ │ ├── resource.js │ │ │ └── rule.js │ │ ├── component.js │ │ ├── lib/ │ │ │ ├── MimeTea.js │ │ │ ├── SyntaxHighlighter/ │ │ │ │ ├── shBrushCss.js │ │ │ │ ├── shBrushJScript.js │ │ │ │ └── shCore.js │ │ │ ├── base64.js │ │ │ ├── beautify/ │ │ │ │ ├── beautify_css.js │ │ │ │ ├── beautify_html.js │ │ │ │ └── beautify_js.js │ │ │ ├── bootstrap.js │ │ │ ├── fiddler.js │ │ │ ├── jquery.js │ │ │ └── when.js │ │ ├── lib.js │ │ └── page/ │ │ ├── background.js │ │ ├── devtools.js │ │ └── options.js │ └── manifest.json └── test/ ├── css/ │ └── base.css └── index.html ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ output/ ================================================ FILE: Fiddler.pem ================================================ -----BEGIN PRIVATE KEY----- MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAKyyd3FMz631KwQ6A oKT4lmDkKHvDf0H9NkgP0lcHz1sc9H1KFv8IopWd31Yex/ydKgq4rCklB0Pldy0Dr 3DRH7IHQqERLeMFP19pT8fhgJokRPu0CdxwZKQ/Mh83y4J1aW6kAvxvXBXIZZZn78 qDlGFgR94hGlV0P55ZThas/Z9AgMBAAECgYBrclI8LOUdv2b3Jzx+j5IJzYCEL97N KlEdciHN+8H4Dmz1GYn1ySaYWXnYg99/HfOU2bHW416/wf2kpmZxjHclQBQdEe36/ s8gvapWrDso+tkvTNUWd9YVqD9a21YC1oZVzCPn8+RKh4+/ZZlzt/2Hn9qsutkgVH coj+bItN5f5QJBAODPrawzdt7R6noaSRmXH9rTX5PcaEkTBgE7ngkgJKKDyPfoAel HwVoB3lpw7/5GPRzpqHzmrsWcqwlb8eWILH8CQQDEp+u2yrJqte1VGr1TdzMHk+oy x+DBP6uReYkQCMGQMnMfwPUYkyBbpJAQdJ9iODnk64p2GfuL/q1cty6QgA8DAkEA0 LS8/QMCNjYXQqgoeRNtxU86iiCyyDRa/MYGH16x5BYIeu3u6E1vWUomzTvP8fXvQm pBu0LFujuKJbQwS/ExrQJAMJ02Rvy6uGh64CP5E44O/luRdLY2mG8t8Yty15TijMv 766ierlGImT8IIhlCYVx262FS3Dk2FviBUL8z8qLFkwJBALp7QMOcGzeEG3pmvCie tqvEs4Nkw8p8itKF2Bs/5t5+Juy6aZobMFyN+JNtLbtplFBnShGKc+qjWH/F3pWTE 2s= -----END PRIVATE KEY----- ================================================ FILE: README.md ================================================ [WARNING] 该项目停止维护,愿意维护的同学请联系 welefen@gmail.com,可以把项目转给你。 Fiddler ======= Fiddler for Chrome Extension visit http://welefen.github.io/Fiddler/ for more infomation. ================================================ FILE: build.sh ================================================ #!/bin/sh STC_PATH="/Users/welefen/Develop/git/stc/src" path=`dirname $0`; first=${path:0:1}; if [[ $first != '/' ]];then path=$(pwd); fi if [ -d ${path}"/output" ];then rm -rf ${path}"/output"; fi mkdir ${path}"/output"; if [ ! -f ${path}"/config.php" ];then cp $STC_PATH/config/config.php ${path}; fi #path=$(pwd); /usr/local/bin/php $STC_PATH/index.php ${path} test online; if [ -f ${path}"/stc.error.log" ]; then rm -rf ${path}"/stc.error.log"; #exit 1; fi cp src/manifest.json output/src/ cp -r src/bin output/src/; mv output/src/ output/Fiddler; if [[ $1 == "1" ]];then /usr/local/bin/php clean.php; cd output; zip -r Fiddler.zip Fiddler/; fi ================================================ FILE: clean.php ================================================ 'smarty', //模版引擎,支持Smarty和PHP 'TPL_LEFT_DELIMITER' => '{%', //smarty左界符 'TPL_RIGHT_DELIMITER' => '%}', //smarty右界符 'TPL_SUFFIX' => 'tpl', //模板文件后缀名 'TPL_PATH' => 'src/application/views/tpls/', //模板目录 'STATIC_PATH' => 'src/', //静态资源的目录 'FILE_ENCODING' => 'utf-8', //项目编码 'MOD_DIRS_CHECK' => true, //目录结构检测 'MOD_FILE_CHECK' => true, //文件命名和位置检测 'MOD_HTML_REGULAR_CHECK' => true, //HTML规范检测 'MOD_CSS_REGULAR_CHECK' => true, //CSS规范检测 "MOD_EMPTY_CHECK" => true, //空文件检测 'MOD_CSS_SPRITES' => false, //是否进行css sprites 'MOD_CSS_AUTOCOMPLETE' => false, //css样式自动补全 'MOD_JS_COMBINE' => true, //JS文件是否启用合并 'MOD_CSS_COMBINE' => true, //CSS文件是否启用合并 'MOD_HTML_COMPRESS' => true, //HTML文件是否启用压缩 'MOD_JS_COMPRESS' => true, //JS文件是否启用压缩 'MOD_CSS_COMPRESS' => true, //CSS文件是否启用压缩 'MOD_OPTI_IMG' => false, //是否优化图片 'MOD_XSS_AUTO_FIXED' => false, //是否进行XSS自动修复 'MOD_IMG_DATAURI' => true, //将CSS中的图片地址转换为dataURI 'MOD_STATIC_TO_CDN' => false, //是否将静态资源上线到CDN 'MOD_JS_TPL_REPLACE' => false, //是否进行前端模版替换 'MOD_STRING_REPLACE' => true, //是否进行代码替换功能 'MOD_STATIC_VERSION' => 1, //静态文件版本号,1或者true为query,2为新文件模式 'COMPRESS_JS_USE_JINGCHUANG' => false, 'HTML_COMPRESS_OPTIONS' => array('compress_tpl_script'=> true) ); ================================================ FILE: plugin/Info.plist ================================================ CFBundleDevelopmentRegion English CFBundleExecutable chrome_fiddler CFBundleGetInfoString 420+, Copyright 2006-2009 Apple Inc. CFBundleIconFile CFBundleIdentifier chrome.chrome_fiddler CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType BRPL CFBundleShortVersionString 1.0 CFBundleSignature ???? CFBundleVersion 1.0 CFPlugInDynamicRegisterFunction CFPlugInDynamicRegistration NO CFPlugInFactories 00000000-0000-0000-0000-000000000000 MyFactoryFunction CFPlugInTypes 00000000-0000-0000-0000-000000000000 00000000-0000-0000-0000-000000000000 CFPlugInUnloadFunction WebPluginDescription Chrome Fiddler Extension Plugin WebPluginMIMETypes application/x-chromefiddler WebPluginExtensions chrome_fiddler WebPluginTypeDescription Chrome Fiddler Extension Plugin WebPluginName Chrome Fiddler Extension Plugin ================================================ FILE: plugin/README.md ================================================ * prototype from [chrome-screen-capture](http://chrome-screen-capture.googlecode.com/svn/trunk/src/plugin) ## Summary 现阶段主要功能是,弹出系统文件选择框,用户通过选择、确定后,将所选文件或文件夹路径返回 ## Methods var path = plugin.GetFilePath(initial_path, dialog_title); 弹出文件选择框,返回所选文件路径 * `initial_path` 是文件选择框的初始位置 * `dialog_title` 是文件选择框上方的标题 * `path` 是用户所选文件的路径 - - - var path = plugin.GetFolderPath(initial_path, dialog_title); 弹出文件夹选择框,返回所选文件夹路径 * `initial_path` 是文件夹选择框的初始位置 * `dialog_title` 是文件夹选择框上方的标题 * `path` 是用户所选文件夹的路径 - - - var path = plugin.OpenFileDialog(initial_path, option) **Deprecated.** 此方法是上面两个方法的结合,缺点在于不能对文件选择框的标题进行设置。 由于前期方法名字起的不好,没准哪天心情不好就去除了,所以标记不建议使用了。 * `initial_path` 是文件或文件夹选择框的初始位置 * `option` 是 `"file"` 则打开文件选择框,是 `"path"` 则打开文件夹选择框 * `path` 是用户所选文件或文件夹的路径 ## Example Mac OSX 下的文件 [chrome_fiddler.plugin][1],Windows 下的文件 [chrome_fiddler.dll][2],type 为 `application/x-chromefiddler` [1]: https://github.com/welefen/Fiddler/tree/master/plugin/chrome_fiddler.plugin [2]: https://github.com/welefen/Fiddler/blob/master/plugin/chrome_fiddler_vs2008_project/Release/chrome_fiddler.dll ================================================ FILE: plugin/build_mac.sh ================================================ #!/bin/sh mkdir -p chrome_fiddler.plugin/Contents/MacOS cp -f Info.plist chrome_fiddler.plugin/Contents g++ -framework Cocoa -DMAC -Wall \ -DWEBKIT_DARWIN_SDK -lresolv -arch i386 -bundle \ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/ \ -mmacosx-version-min=10.6 \ -o chrome_fiddler.plugin/Contents/MacOS/chrome_fiddler \ log.cc np_entry.cc npn_entry.cc npp_entry.cc plugin_base.cc \ plugin_factory.cc chrome_fiddler.mm chrome_fiddler_plugin.cc \ chrome_fiddler_script_object.cc script_object_base.cc script_object_factory.cc &&\ cp chrome_fiddler.plugin/Contents/MacOS/chrome_fiddler \ ../src/bin/chrome_fiddler.plugin/Contents/MacOS/ ================================================ FILE: plugin/chrome_fiddler.mm ================================================ #include #import std::string GetFilePathNS(const char* path, const char* dialog_title, bool isFolder) { int runResult; NSString *str = [NSString stringWithUTF8String:path]; str = [NSString stringWithFormat:@"%@%@", @"file://", str]; NSURL *url = [NSURL URLWithString:[str stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; NSOpenPanel *op = [NSOpenPanel openPanel]; if (isFolder) { [op setCanChooseDirectories:YES]; [op setCanChooseFiles:NO]; } else { [op setCanChooseDirectories:NO]; [op setCanChooseFiles:YES]; } [op setAllowsMultipleSelection:NO]; [op setDirectoryURL:url]; [op setTitle:[NSString stringWithUTF8String:dialog_title]]; runResult = [op runModal]; if (runResult == NSOKButton) { NSArray *paths = [op URLs]; return [[[paths lastObject] path] UTF8String]; } else { return [[NSString stringWithUTF8String:path] UTF8String]; } } bool IsWritableFile(const char* path) { NSFileManager *fm = [NSFileManager defaultManager]; return [fm isWritableFileAtPath:[NSString stringWithUTF8String:path]]; } ================================================ FILE: plugin/chrome_fiddler.plugin/Contents/Info.plist ================================================ CFBundleDevelopmentRegion English CFBundleExecutable chrome_fiddler CFBundleGetInfoString 420+, Copyright 2006-2009 Apple Inc. CFBundleIconFile CFBundleIdentifier chrome.chrome_fiddler CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType BRPL CFBundleShortVersionString 1.0 CFBundleSignature ???? CFBundleVersion 1.0 CFPlugInDynamicRegisterFunction CFPlugInDynamicRegistration NO CFPlugInFactories 00000000-0000-0000-0000-000000000000 MyFactoryFunction CFPlugInTypes 00000000-0000-0000-0000-000000000000 00000000-0000-0000-0000-000000000000 CFPlugInUnloadFunction WebPluginDescription Chrome Fiddler Extension Plugin WebPluginMIMETypes application/x-chromefiddler WebPluginExtensions chrome_fiddler WebPluginTypeDescription Chrome Fiddler Extension Plugin WebPluginName Chrome Fiddler Extension Plugin ================================================ FILE: plugin/chrome_fiddler_plugin.cc ================================================ #include "chrome_fiddler_plugin.h" #include #include "log.h" #include "chrome_fiddler_script_object.h" #include "script_object_factory.h" extern Log g_logger; NPError ChromeFiddlerPlugin::Init(NPP instance, uint16_t mode, int16_t argc, char* argn[],char* argv[], NPSavedData* saved) { g_logger.WriteLog("msg", "ChromeFiddlerPlugin Init"); script_object_ = NULL; #ifdef _WINDOWS int bWindowed = 1; #else int bWindowed = 0; #endif #ifdef MAC // Select the right drawing model if necessary. NPBool support_core_graphics = false; if (NPN_GetValue(instance, NPNVsupportsCoreGraphicsBool, &support_core_graphics) == NPERR_NO_ERROR && support_core_graphics) NPN_SetValue(instance, NPPVpluginDrawingModel, (void*)NPDrawingModelCoreGraphics); else return NPERR_INCOMPATIBLE_VERSION_ERROR; // Select the Cocoa event model. NPBool support_cocoa_events = false; if (NPN_GetValue(instance, NPNVsupportsCocoaBool, &support_cocoa_events) == NPERR_NO_ERROR && support_cocoa_events) NPN_SetValue(instance, NPPVpluginEventModel, (void*)NPEventModelCocoa); else return NPERR_INCOMPATIBLE_VERSION_ERROR; #endif NPN_SetValue(instance, NPPVpluginWindowBool, (void *)bWindowed); instance->pdata = this; return PluginBase::Init(instance, mode, argc, argn, argv, saved); } NPError ChromeFiddlerPlugin::UnInit(NPSavedData** save) { g_logger.WriteLog("msg", "ChromeFiddlerPlugin UnInit"); g_logger.CloseLog(); PluginBase::UnInit(save); script_object_ = NULL; return NPERR_NO_ERROR; } NPError ChromeFiddlerPlugin::GetValue(NPPVariable variable, void *value) { switch(variable) { case NPPVpluginScriptableNPObject: if (script_object_ == NULL) script_object_ = ScriptObjectFactory::CreateObject(get_npp(), ChromeFiddlerScriptObject::Allocate); if (script_object_ != NULL) *(NPObject**)value = script_object_; else return NPERR_OUT_OF_MEMORY_ERROR; break; case NPPVpluginNeedsXEmbed: *(bool*)value = 1; break; default: return NPERR_GENERIC_ERROR; } return NPERR_NO_ERROR; } NPError ChromeFiddlerPlugin::SetWindow(NPWindow* window) { #ifdef _WINDOWS PluginBase::SetWindow(window); #endif return NPERR_NO_ERROR; } ================================================ FILE: plugin/chrome_fiddler_plugin.h ================================================ #ifndef CHROME_FIDDLER_PLUGIN_H_ #define CHROME_FIDDLER_PLUGIN_H_ #include "npapi.h" #include "npruntime.h" #include "npfunctions.h" #include "plugin_base.h" #include "script_object_base.h" class ChromeFiddlerPlugin : public PluginBase { public: ChromeFiddlerPlugin() {} virtual ~ChromeFiddlerPlugin() {} NPError Init(NPP instance, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData* saved); NPError UnInit(NPSavedData** saved); NPError GetValue(NPPVariable variable, void *value); NPError SetWindow(NPWindow* window); static PluginBase* CreateObject() { return new ChromeFiddlerPlugin; } private: ScriptObjectBase* script_object_; }; #endif // CHROME_FIDDLER_PLUGIN_H_ ================================================ FILE: plugin/chrome_fiddler_script_object.cc ================================================ #include "chrome_fiddler_script_object.h" #include #include #ifdef _WINDOWS #include #include #include #include #elif defined __APPLE__ #include #include #endif #include #include "log.h" #include "chrome_fiddler_plugin.h" #include "utils.h" #ifdef _WINDOWS using namespace Gdiplus; #define snprintf sprintf_s struct BrowserParam { TCHAR initial_path[MAX_PATH]; TCHAR title[MAX_PATH]; }; #else #define MAX_PATH 260 #endif extern Log g_logger; NPObject* ChromeFiddlerScriptObject::Allocate(NPP npp, NPClass *aClass) { g_logger.WriteLog("msg", "ChromeFiddlerScriptObject Allocate"); ChromeFiddlerScriptObject* script_object = new ChromeFiddlerScriptObject; if (script_object != NULL) script_object->set_plugin((PluginBase*)npp->pdata); return script_object; } void ChromeFiddlerScriptObject::Deallocate() { g_logger.WriteLog("msg", "ChromeFiddlerScriptObject Deallocate"); delete this; } void ChromeFiddlerScriptObject::InitHandler() { FunctionItem item; item.function_name = "OpenFileDialog"; item.function_pointer = ON_INVOKEHELPER(&ChromeFiddlerScriptObject::OpenFileDialog); AddFunction(item); item.function_name = "GetFilePath"; item.function_pointer = ON_INVOKEHELPER(&ChromeFiddlerScriptObject::GetFilePath); AddFunction(item); item.function_name = "GetFolderPath"; item.function_pointer = ON_INVOKEHELPER(&ChromeFiddlerScriptObject::GetFolderPath); AddFunction(item); item.function_name = "SaveFile"; item.function_pointer = ON_INVOKEHELPER(&ChromeFiddlerScriptObject::SaveFile); AddFunction(item); } #ifdef _WINDOWS namespace { int WINAPI BrowserCallback(NativeWindow nw, UINT uMsg, LPARAM lParam, LPARAM lpData) { switch (uMsg) { case BFFM_INITIALIZED: BrowserParam* param = (BrowserParam*)lpData; SendMessage(nw, BFFM_SETSELECTION, TRUE, (LPARAM)param->initial_path); SetWindowText(nw, param->title); NativeWindow treeview = FindWindowEx(nw, NULL, L"SysTreeView32", NULL); NativeWindow ok_button = FindWindowEx(nw, NULL, L"Button", NULL); if (treeview && ok_button) { RECT rect_treeview,rect_ok_button; GetWindowRect(treeview, &rect_treeview); POINT pt_treeview, pt_button; pt_treeview.x = rect_treeview.left; pt_treeview.y = 0; ScreenToClient(nw, &pt_treeview); GetWindowRect(ok_button, &rect_ok_button); pt_button.x = rect_ok_button.left; pt_button.y = rect_ok_button.top; ScreenToClient(nw, &pt_button); MoveWindow(treeview, pt_treeview.x, pt_treeview.x, rect_treeview.right-rect_treeview.left, pt_button.y-2*pt_treeview.x, TRUE); } break; } return 0; } } #elif defined __APPLE__ std::string GetFilePathNS(const char* path, const char* dialog_title, bool isFolder); bool IsWritableFile(const char* path); #endif bool ChromeFiddlerScriptObject::OpenFileDialog(const NPVariant* args, uint32_t argCount, NPVariant* result) { if (argCount < 2 || !NPVARIANT_IS_STRING(args[0]) || !NPVARIANT_IS_STRING(args[1])) return false; std::string option(NPVARIANT_TO_STRING(args[1]).UTF8Characters, NPVARIANT_TO_STRING(args[1]).UTF8Length); std::string title = "Select A Stuff, Buddy"; size_t length = title.length(); NPVariant dialog_title; STRINGN_TO_NPVARIANT(title.c_str(), length, dialog_title); const NPVariant params[2] = {args[0], dialog_title}; if (option == "file") return GetFilePath(params, 2, result); else return GetFolderPath(params, 2, result); } bool ChromeFiddlerScriptObject::GetFilePath(const NPVariant* args, uint32_t argCount, NPVariant* result) { if (argCount < 2 || !NPVARIANT_IS_STRING(args[0]) || !NPVARIANT_IS_STRING(args[1])) return false; std::string path(NPVARIANT_TO_STRING(args[0]).UTF8Characters, NPVARIANT_TO_STRING(args[0]).UTF8Length); std::string title(NPVARIANT_TO_STRING(args[1]).UTF8Characters, NPVARIANT_TO_STRING(args[1]).UTF8Length); #ifdef _WINDOWS TCHAR display_name[MAX_PATH] = {0}; BrowserParam param = {0}; BOOL bRet; MultiByteToWideChar(CP_UTF8, 0, path.c_str(), -1, param.initial_path, MAX_PATH); MultiByteToWideChar(CP_UTF8, 0, title.c_str(), -1, param.title, MAX_PATH); OPENFILENAME ofn = {0}; ofn.lStructSize = sizeof(ofn); ofn.hwndOwner = get_plugin()->get_native_window(); ofn.lpstrFilter = _T("All Files(*.*)\0*.*\0"); ofn.lpstrInitialDir = param.initial_path; ofn.lpstrFile = display_name; ofn.nMaxFile = sizeof(display_name) / sizeof(*display_name); ofn.nFilterIndex = 0; ofn.lpstrTitle = param.title; ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST | OFN_EXPLORER; bRet = GetOpenFileName(&ofn); char utf8[MAX_PATH]; WideCharToMultiByte(CP_UTF8, 0, bRet ? display_name : param.initial_path, -1, utf8, MAX_PATH, 0, 0); size_t length = strlen(utf8); #elif __APPLE__ std::string pathStr = GetFilePathNS(path.c_str(), title.c_str(), false); const char* utf8 = pathStr.c_str(); size_t length = pathStr.length(); #endif char* copy = (char *)NPN_MemAlloc(length + 1); memcpy(copy, utf8, length); copy[length] = 0; STRINGN_TO_NPVARIANT(copy, length, *result); return true; } bool ChromeFiddlerScriptObject::GetFolderPath(const NPVariant* args, uint32_t argCount, NPVariant* result) { if (argCount < 2 || !NPVARIANT_IS_STRING(args[0]) || !NPVARIANT_IS_STRING(args[1])) return false; std::string path(NPVARIANT_TO_STRING(args[0]).UTF8Characters, NPVARIANT_TO_STRING(args[0]).UTF8Length); std::string title(NPVARIANT_TO_STRING(args[1]).UTF8Characters, NPVARIANT_TO_STRING(args[1]).UTF8Length); #ifdef _WINDOWS TCHAR display_name[MAX_PATH] = {0}; BrowserParam param = {0}; BOOL bRet; MultiByteToWideChar(CP_UTF8, 0, path.c_str(), -1, param.initial_path, MAX_PATH); MultiByteToWideChar(CP_UTF8, 0, title.c_str(), -1, param.title, MAX_PATH); BROWSEINFO info = {0}; info.hwndOwner = get_plugin()->get_native_window(); info.lpszTitle = NULL; info.pszDisplayName = display_name; info.lpfn = BrowserCallback; info.ulFlags = BIF_RETURNONLYFSDIRS; info.lParam = (LPARAM)¶m; bRet = SHGetPathFromIDList(SHBrowseForFolder(&info), display_name); char utf8[MAX_PATH]; WideCharToMultiByte(CP_UTF8, 0, bRet ? display_name : param.initial_path, -1, utf8, MAX_PATH, 0, 0); size_t length = strlen(utf8); #elif __APPLE__ std::string pathStr = GetFilePathNS(path.c_str(), title.c_str(), true); const char* utf8 = pathStr.c_str(); size_t length = pathStr.length(); #endif char* copy = (char *)NPN_MemAlloc(length + 1); memcpy(copy, utf8, length); copy[length] = 0; STRINGN_TO_NPVARIANT(copy, length, *result); return true; } bool ChromeFiddlerScriptObject::SaveFile(const NPVariant* args, uint32_t argCount, NPVariant* result) { if (argCount < 3 || !NPVARIANT_IS_STRING(args[0]) || !NPVARIANT_IS_STRING(args[1]) || !NPVARIANT_IS_OBJECT(args[2]) || !NPVARIANT_TO_OBJECT(args[2])) return false; const char* fileName = NPVARIANT_TO_STRING(args[0]).UTF8Characters; const char* content = NPVARIANT_TO_STRING(args[1]).UTF8Characters; uint32_t length = NPVARIANT_TO_STRING(args[1]).UTF8Length; NPObject* callback = NPVARIANT_TO_OBJECT(args[2]); #ifdef _WINDOWS TCHAR szWideBuf[MAX_PATH] = { 0 }; MultiByteToWideChar(CP_UTF8, 0, fileName, -1, szWideBuf, MAX_PATH); DWORD d = GetFileAttributes(szWideBuf); if (!PathFileExists(szWideBuf) || d & FILE_ATTRIBUTE_DIRECTORY || d & FILE_ATTRIBUTE_READONLY) { g_logger.WriteLog("error", "SaveFile: Is A Folder"); #elif defined __APPLE__ if (!IsWritableFile(fileName)) { g_logger.WriteLog("error", "SaveFile: File Is Not Writable"); #endif InvokeCallback(get_plugin()->get_npp(), callback, "failure"); return true; } #ifdef _WINDOWS int len = MultiByteToWideChar(CP_UTF8, 0, fileName, -1, NULL, 0); wchar_t* wstr = new wchar_t[len + 1]; memset(wstr, 0, len * 2 + 2); MultiByteToWideChar(CP_UTF8, 0, fileName, -1, wstr, len); len = WideCharToMultiByte(CP_ACP, 0, wstr, -1, NULL, 0, NULL, NULL); char* path = new char[len + 1]; memset(path, 0, len + 1); WideCharToMultiByte (CP_ACP, 0, wstr, -1, path, len, NULL, NULL); delete[] wstr; FILE* out = fopen(path, "w"); #elif defined __APPLE__ FILE* out = fopen(fileName, "w"); #endif if (out) { fwrite(content, length, 1, out); fclose(out); InvokeCallback(get_plugin()->get_npp(), callback, "success"); return true; } g_logger.WriteLog("error", "SaveFile: File Cannot Open"); InvokeCallback(get_plugin()->get_npp(), callback, "failure"); return true; } // static void ChromeFiddlerScriptObject::InvokeCallback(NPP npp, NPObject* callback, const char* param) { NPVariant npParam; STRINGZ_TO_NPVARIANT(param, npParam); NPVariant result; VOID_TO_NPVARIANT(result); NPN_InvokeDefault(npp, callback, &npParam, 1, &result); } ================================================ FILE: plugin/chrome_fiddler_script_object.h ================================================ #ifndef CHROME_FIDDLER_SCRIPT_OBJECT_H_ #define CHROME_FIDDLER_SCRIPT_OBJECT_H_ #include "npfunctions.h" #include "script_object_base.h" class ChromeFiddlerScriptObject: public ScriptObjectBase { public: ChromeFiddlerScriptObject() {} virtual ~ChromeFiddlerScriptObject() {} static NPObject* Allocate(NPP npp, NPClass* aClass); void Deallocate(); void Invalidate() {} bool Construct(const NPVariant* args, uint32_t argCount, NPVariant* result) { return true; } bool OpenFileDialog(const NPVariant* args, uint32_t argCount, NPVariant* result); bool GetFilePath(const NPVariant* args, uint32_t argCount, NPVariant* result); bool GetFolderPath(const NPVariant* args, uint32_t argCount, NPVariant* result); bool SaveFile(const NPVariant* args, uint32_t argCount, NPVariant* result); void InitHandler(); private: static void InvokeCallback(NPP npp, NPObject* callback, const char* param); }; #endif // CHROME_FIDDLER_SCRIPT_OBJECT_H_ ================================================ FILE: plugin/chrome_fiddler_vs2008_project/chrome_fiddler/chrome_fiddler.def ================================================ LIBRARY "chrome_fiddler" EXPORTS NP_GetEntryPoints @1 NP_Initialize @2 NP_Shutdown @3 NP_GetMIMEDescription @4 ================================================ FILE: plugin/chrome_fiddler_vs2008_project/chrome_fiddler/chrome_fiddler.rc ================================================ // Microsoft Visual C++ generated resource script. // #include "resource.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #include "winresrc.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // (л񹲺͹) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS) #ifdef _WIN32 LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED #pragma code_page(936) #endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// // // Dialog // IDD_PREVIEW DIALOGEX 0, 0, 366, 211 STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_SYSMENU EXSTYLE WS_EX_TOOLWINDOW FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN END ///////////////////////////////////////////////////////////////////////////// // // DESIGNINFO // #ifdef APSTUDIO_INVOKED GUIDELINES DESIGNINFO BEGIN IDD_PREVIEW, DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 359 TOPMARGIN, 7 BOTTOMMARGIN, 204 END END #endif // APSTUDIO_INVOKED #endif // (л񹲺͹) resources ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Ӣ() resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// // // Version // VS_VERSION_INFO VERSIONINFO FILEVERSION 1,0,0,1 PRODUCTVERSION 1,0,0,1 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS 0x40004L FILETYPE 0x2L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904e4" BEGIN VALUE "FileDescription", "This is a npapi plugin built for Chrome on Windows." VALUE "FileOpenName", "Chrome Fiddler Plugin" VALUE "FileVersion", "1, 0, 0, 1" VALUE "InternalName", "ChromeFiddlerPlugin" VALUE "LegalCopyright", "Copyright 2013 Ice White" VALUE "MIMEType", "application/x-chromefiddler" VALUE "OriginalFilename", "chrome_fiddler.dll" VALUE "ProductName", "Chrome Fiddler Plugin" VALUE "ProductVersion", "1, 0, 0, 1" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1252 END END #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE BEGIN "resource.h\0" END 2 TEXTINCLUDE BEGIN "#include ""winresrc.h""\r\n" "\0" END 3 TEXTINCLUDE BEGIN "\r\n" "\0" END #endif // APSTUDIO_INVOKED #endif // Ӣ() resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED ================================================ FILE: plugin/chrome_fiddler_vs2008_project/chrome_fiddler/chrome_fiddler.vcproj ================================================ ================================================ FILE: plugin/chrome_fiddler_vs2008_project/chrome_fiddler/resource.h ================================================ //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by chrome_fiddler.rc // ¶һĬֵ // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 101 #define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_CONTROL_VALUE 1001 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif ================================================ FILE: plugin/chrome_fiddler_vs2008_project/chrome_fiddler.ncb ================================================ [File too large to display: 17.4 MB] ================================================ FILE: plugin/chrome_fiddler_vs2008_project/chrome_fiddler.sln ================================================  Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "chrome_fiddler", "chrome_fiddler\chrome_fiddler.vcproj", "{DD996793-2B7D-464D-BA6A-0B9CB08557EE}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {DD996793-2B7D-464D-BA6A-0B9CB08557EE}.Debug|Win32.ActiveCfg = Debug|Win32 {DD996793-2B7D-464D-BA6A-0B9CB08557EE}.Debug|Win32.Build.0 = Debug|Win32 {DD996793-2B7D-464D-BA6A-0B9CB08557EE}.Release|Win32.ActiveCfg = Release|Win32 {DD996793-2B7D-464D-BA6A-0B9CB08557EE}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: plugin/log.cc ================================================ #include "log.h" #include #ifndef _WINDOWS #include #include #include #endif #ifndef _WINDOWS #define MAX_PATH 260 #endif Log::Log(void) { file_ = NULL; } Log::~Log(void) { if (file_ != NULL) CloseLog(); } bool Log::OpenLog(const char* header) { if (file_ != NULL) return false; #ifdef _WINDOWS char filename[MAX_PATH]; GetLocalTime(&time_); sprintf_s(filename, "C:\\Windows\\Temp\\%s_%d%02d%02d_%d.log", header, time_.wYear, time_.wMonth, time_.wDay, GetCurrentProcessId()); #else char filename[MAX_PATH]; time_t nowtime = time(NULL); struct tm* time_ = localtime(&nowtime); sprintf(filename, "/tmp/%s_%d%02d%02d_%d.log", header, time_->tm_year+1900, time_->tm_mon+1, time_->tm_mday, getpid()); #endif file_ = fopen(filename, "a"); if (file_ == NULL) return false; else return true; } bool Log::WriteLog(const char* title, const char* contents) { if (file_ == NULL) { return false; } #ifdef _WINDOWS GetLocalTime(&time_); if (fprintf(file_, "[%02d:%02d:%02d %03d] [%s] %s\n", time_.wHour, time_.wMinute, time_.wSecond, time_.wMilliseconds, title, contents) > 0) { #else timeval nowtime; gettimeofday(&nowtime, NULL); struct tm* time_ = localtime(&nowtime.tv_sec); if (fprintf(file_, "[%02d:%02d:%02d %ld] [%s] %s\n", time_->tm_hour, time_->tm_min, time_->tm_sec, (unsigned long)nowtime.tv_usec, title, contents) > 0) { #endif fflush(file_); return true; } else return false; } bool Log::CloseLog() { if (file_ != NULL) { fclose(file_); file_ = NULL; } return true; } ================================================ FILE: plugin/log.h ================================================ #ifndef LOG_H_ #define LOG_H_ #include #ifdef _WINDOWS #include #endif class Log { public: Log(void); ~Log(void); bool OpenLog(const char* header); bool WriteLog(const char* title, const char* contents); bool CloseLog(); private: FILE* file_; #ifdef _WINDOWS SYSTEMTIME time_; #endif }; #endif ================================================ FILE: plugin/np_entry.cc ================================================ #include #include "log.h" #include "npapi.h" #include "npfunctions.h" #include "plugin_factory.h" #ifdef _WINDOWS #include #include using namespace Gdiplus; ULONG_PTR token; #pragma comment(lib,"gdiplus.lib") #endif extern NPNetscapeFuncs* g_npn_funcs; Log g_logger; #ifdef __cplusplus extern "C" { #endif #ifndef HIBYTE #define HIBYTE(x) ((((unsigned short)(x)) & 0xff00) >> 8) #endif NPError OSCALL NP_GetEntryPoints(NPPluginFuncs* nppfuncs) { nppfuncs->version = (NP_VERSION_MAJOR << 8) | NP_VERSION_MINOR; nppfuncs->newp = NPP_New; nppfuncs->destroy = NPP_Destroy; nppfuncs->setwindow = NPP_SetWindow; nppfuncs->newstream = NPP_NewStream; nppfuncs->destroystream = NPP_DestroyStream; nppfuncs->asfile = NPP_StreamAsFile; nppfuncs->writeready = NPP_WriteReady; nppfuncs->write = NPP_Write; nppfuncs->print = NPP_Print; nppfuncs->event = NPP_HandleEvent; nppfuncs->urlnotify = NPP_URLNotify; nppfuncs->getvalue = NPP_GetValue; nppfuncs->setvalue = NPP_SetValue; return NPERR_NO_ERROR; } NPError OSCALL NP_Initialize(NPNetscapeFuncs* npnf #if !defined(_WINDOWS) && !defined(WEBKIT_DARWIN_SDK) , NPPluginFuncs* nppfuncs #endif ) { PluginFactory::Init(); g_logger.OpenLog("NPAPI"); if(npnf == NULL) { return NPERR_INVALID_FUNCTABLE_ERROR; } if(HIBYTE(npnf->version) > NP_VERSION_MAJOR) { return NPERR_INCOMPATIBLE_VERSION_ERROR; } g_npn_funcs = npnf; #if !defined(_WINDOWS) && !defined(WEBKIT_DARWIN_SDK) NP_GetEntryPoints(nppfuncs); #endif #ifdef _WINDOWS GdiplusStartupInput input; GdiplusStartup(&token, &input, NULL); #endif return NPERR_NO_ERROR; } NPError OSCALL NP_Shutdown() { #ifdef _WINDOWS GdiplusShutdown(token); #endif return NPERR_NO_ERROR; } char* NP_GetMIMEDescription(void) { return "application/x-chromefiddler::Fiddler in Chrome"; } // Needs to be present for WebKit based browsers. NPError OSCALL NP_GetValue(void* npp, NPPVariable variable, void* value) { return NPP_GetValue((NPP)npp, variable, value); } #ifdef __cplusplus } #endif ================================================ FILE: plugin/npapi.h ================================================ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1998 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ #ifndef npapi_h_ #define npapi_h_ #if defined(__OS2__) #pragma pack(1) #endif #include "nptypes.h" #if defined(__OS2__) || defined(OS2) #ifndef XP_OS2 #define XP_OS2 1 #endif #endif #if defined(_WIN32) && !defined(__SYMBIAN32__) #include #ifndef XP_WIN #define XP_WIN 1 #endif #endif #if defined(__SYMBIAN32__) #ifndef XP_SYMBIAN #define XP_SYMBIAN 1 #undef XP_WIN #endif #endif #if defined(__APPLE_CC__) && !defined(XP_UNIX) #ifndef XP_MACOSX #define XP_MACOSX 1 #endif #endif #if defined(XP_MACOSX) && defined(__LP64__) #define NP_NO_QUICKDRAW #define NP_NO_CARBON #endif #if defined(XP_MACOSX) #include #include #ifndef NP_NO_CARBON #include #endif #endif #if defined(XP_UNIX) #include #if defined(MOZ_X11) #include #include #endif #endif #if defined(XP_SYMBIAN) #include #include #endif /*----------------------------------------------------------------------*/ /* Plugin Version Constants */ /*----------------------------------------------------------------------*/ #define NP_VERSION_MAJOR 0 #define NP_VERSION_MINOR 26 /* The OS/2 version of Netscape uses RC_DATA to define the mime types, file extensions, etc that are required. Use a vertical bar to separate types, end types with \0. FileVersion and ProductVersion are 32bit ints, all other entries are strings that MUST be terminated with a \0. AN EXAMPLE: RCDATA NP_INFO_ProductVersion { 1,0,0,1,} RCDATA NP_INFO_MIMEType { "video/x-video|", "video/x-flick\0" } RCDATA NP_INFO_FileExtents { "avi|", "flc\0" } RCDATA NP_INFO_FileOpenName{ "MMOS2 video player(*.avi)|", "MMOS2 Flc/Fli player(*.flc)\0" } RCDATA NP_INFO_FileVersion { 1,0,0,1 } RCDATA NP_INFO_CompanyName { "Netscape Communications\0" } RCDATA NP_INFO_FileDescription { "NPAVI32 Extension DLL\0" RCDATA NP_INFO_InternalName { "NPAVI32\0" ) RCDATA NP_INFO_LegalCopyright { "Copyright Netscape Communications \251 1996\0" RCDATA NP_INFO_OriginalFilename { "NVAPI32.DLL" } RCDATA NP_INFO_ProductName { "NPAVI32 Dynamic Link Library\0" } */ /* RC_DATA types for version info - required */ #define NP_INFO_ProductVersion 1 #define NP_INFO_MIMEType 2 #define NP_INFO_FileOpenName 3 #define NP_INFO_FileExtents 4 /* RC_DATA types for version info - used if found */ #define NP_INFO_FileDescription 5 #define NP_INFO_ProductName 6 /* RC_DATA types for version info - optional */ #define NP_INFO_CompanyName 7 #define NP_INFO_FileVersion 8 #define NP_INFO_InternalName 9 #define NP_INFO_LegalCopyright 10 #define NP_INFO_OriginalFilename 11 #ifndef RC_INVOKED /*----------------------------------------------------------------------*/ /* Definition of Basic Types */ /*----------------------------------------------------------------------*/ typedef unsigned char NPBool; typedef int16_t NPError; typedef int16_t NPReason; typedef char* NPMIMEType; /*----------------------------------------------------------------------*/ /* Structures and definitions */ /*----------------------------------------------------------------------*/ #if !defined(__LP64__) #if defined(XP_MACOSX) #pragma options align=mac68k #endif #endif /* __LP64__ */ /* * NPP is a plug-in's opaque instance handle */ typedef struct _NPP { void* pdata; /* plug-in private data */ void* ndata; /* netscape private data */ } NPP_t; typedef NPP_t* NPP; typedef struct _NPStream { void* pdata; /* plug-in private data */ void* ndata; /* netscape private data */ const char* url; uint32_t end; uint32_t lastmodified; void* notifyData; const char* headers; /* Response headers from host. * Exists only for >= NPVERS_HAS_RESPONSE_HEADERS. * Used for HTTP only; NULL for non-HTTP. * Available from NPP_NewStream onwards. * Plugin should copy this data before storing it. * Includes HTTP status line and all headers, * preferably verbatim as received from server, * headers formatted as in HTTP ("Header: Value"), * and newlines (\n, NOT \r\n) separating lines. * Terminated by \n\0 (NOT \n\n\0). */ } NPStream; typedef struct _NPByteRange { int32_t offset; /* negative offset means from the end */ uint32_t length; struct _NPByteRange* next; } NPByteRange; typedef struct _NPSavedData { int32_t len; void* buf; } NPSavedData; typedef struct _NPRect { uint16_t top; uint16_t left; uint16_t bottom; uint16_t right; } NPRect; typedef struct _NPSize { int32_t width; int32_t height; } NPSize; typedef enum { NPFocusNext = 0, NPFocusPrevious = 1 } NPFocusDirection; /* Return values for NPP_HandleEvent */ #define kNPEventNotHandled 0 #define kNPEventHandled 1 /* Exact meaning must be spec'd in event model. */ #define kNPEventStartIME 2 #if defined(XP_UNIX) /* * Unix specific structures and definitions */ /* * Callback Structures. * * These are used to pass additional platform specific information. */ enum { NP_SETWINDOW = 1, NP_PRINT }; typedef struct { int32_t type; } NPAnyCallbackStruct; typedef struct { int32_t type; #if defined(MOZ_X11) Display* display; Visual* visual; Colormap colormap; unsigned int depth; #endif } NPSetWindowCallbackStruct; typedef struct { int32_t type; FILE* fp; } NPPrintCallbackStruct; #endif /* XP_UNIX */ #if defined(XP_MACOSX) typedef enum { #ifndef NP_NO_QUICKDRAW NPDrawingModelQuickDraw = 0, #endif NPDrawingModelCoreGraphics = 1, NPDrawingModelOpenGL = 2, NPDrawingModelCoreAnimation = 3, NPDrawingModelInvalidatingCoreAnimation = 4 } NPDrawingModel; typedef enum { #ifndef NP_NO_CARBON NPEventModelCarbon = 0, #endif NPEventModelCocoa = 1 } NPEventModel; #endif /* * The following masks are applied on certain platforms to NPNV and * NPPV selectors that pass around pointers to COM interfaces. Newer * compilers on some platforms may generate vtables that are not * compatible with older compilers. To prevent older plugins from * not understanding a new browser's ABI, these masks change the * values of those selectors on those platforms. To remain backwards * compatible with different versions of the browser, plugins can * use these masks to dynamically determine and use the correct C++ * ABI that the browser is expecting. This does not apply to Windows * as Microsoft's COM ABI will likely not change. */ #define NP_ABI_GCC3_MASK 0x10000000 /* * gcc 3.x generated vtables on UNIX and OSX are incompatible with * previous compilers. */ #if (defined(XP_UNIX) && defined(__GNUC__) && (__GNUC__ >= 3)) #define _NP_ABI_MIXIN_FOR_GCC3 NP_ABI_GCC3_MASK #else #define _NP_ABI_MIXIN_FOR_GCC3 0 #endif #if defined(XP_MACOSX) #define NP_ABI_MACHO_MASK 0x01000000 #define _NP_ABI_MIXIN_FOR_MACHO NP_ABI_MACHO_MASK #else #define _NP_ABI_MIXIN_FOR_MACHO 0 #endif #define NP_ABI_MASK (_NP_ABI_MIXIN_FOR_GCC3 | _NP_ABI_MIXIN_FOR_MACHO) /* * List of variable names for which NPP_GetValue shall be implemented */ typedef enum { NPPVpluginNameString = 1, NPPVpluginDescriptionString, NPPVpluginWindowBool, NPPVpluginTransparentBool, NPPVjavaClass, NPPVpluginWindowSize, NPPVpluginTimerInterval, NPPVpluginScriptableInstance = (10 | NP_ABI_MASK), NPPVpluginScriptableIID = 11, NPPVjavascriptPushCallerBool = 12, NPPVpluginKeepLibraryInMemory = 13, NPPVpluginNeedsXEmbed = 14, /* Get the NPObject for scripting the plugin. Introduced in NPAPI minor version 14. */ NPPVpluginScriptableNPObject = 15, /* Get the plugin value (as \0-terminated UTF-8 string data) for * form submission if the plugin is part of a form. Use * NPN_MemAlloc() to allocate memory for the string data. Introduced * in NPAPI minor version 15. */ NPPVformValue = 16, NPPVpluginUrlRequestsDisplayedBool = 17, /* Checks if the plugin is interested in receiving the http body of * all http requests (including failed ones, http status != 200). */ NPPVpluginWantsAllNetworkStreams = 18, /* Browsers can retrieve a native ATK accessibility plug ID via this variable. */ NPPVpluginNativeAccessibleAtkPlugId = 19, /* Checks to see if the plug-in would like the browser to load the "src" attribute. */ NPPVpluginCancelSrcStream = 20, NPPVSupportsAdvancedKeyHandling = 21 #if defined(XP_MACOSX) /* Used for negotiating drawing models */ , NPPVpluginDrawingModel = 1000 /* Used for negotiating event models */ , NPPVpluginEventModel = 1001 /* In the NPDrawingModelCoreAnimation drawing model, the browser asks the plug-in for a Core Animation layer. */ , NPPVpluginCoreAnimationLayer = 1003 #endif #if (MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6) , NPPVpluginWindowlessLocalBool = 2002 #endif } NPPVariable; /* * List of variable names for which NPN_GetValue should be implemented. */ typedef enum { NPNVxDisplay = 1, NPNVxtAppContext, NPNVnetscapeWindow, NPNVjavascriptEnabledBool, NPNVasdEnabledBool, NPNVisOfflineBool, NPNVserviceManager = (10 | NP_ABI_MASK), NPNVDOMElement = (11 | NP_ABI_MASK), NPNVDOMWindow = (12 | NP_ABI_MASK), NPNVToolkit = (13 | NP_ABI_MASK), NPNVSupportsXEmbedBool = 14, /* Get the NPObject wrapper for the browser window. */ NPNVWindowNPObject = 15, /* Get the NPObject wrapper for the plugins DOM element. */ NPNVPluginElementNPObject = 16, NPNVSupportsWindowless = 17, NPNVprivateModeBool = 18, NPNVsupportsAdvancedKeyHandling = 21 #if defined(XP_MACOSX) /* Used for negotiating drawing models */ , NPNVpluginDrawingModel = 1000 #ifndef NP_NO_QUICKDRAW , NPNVsupportsQuickDrawBool = 2000 #endif , NPNVsupportsCoreGraphicsBool = 2001 , NPNVsupportsOpenGLBool = 2002 , NPNVsupportsCoreAnimationBool = 2003 , NPNVsupportsInvalidatingCoreAnimationBool = 2004 #ifndef NP_NO_CARBON , NPNVsupportsCarbonBool = 3000 /* TRUE if the browser supports the Carbon event model */ #endif , NPNVsupportsCocoaBool = 3001 /* TRUE if the browser supports the Cocoa event model */ #endif #if (MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6) , NPNVSupportsWindowlessLocal = 2002 #endif } NPNVariable; typedef enum { NPNURLVCookie = 501, NPNURLVProxy } NPNURLVariable; /* * The type of Toolkit the widgets use */ typedef enum { NPNVGtk12 = 1, NPNVGtk2 } NPNToolkitType; /* * The type of a NPWindow - it specifies the type of the data structure * returned in the window field. */ typedef enum { NPWindowTypeWindow = 1, NPWindowTypeDrawable } NPWindowType; typedef struct _NPWindow { void* window; /* Platform specific window handle */ /* OS/2: x - Position of bottom left corner */ /* OS/2: y - relative to visible netscape window */ int32_t x; /* Position of top left corner relative */ int32_t y; /* to a netscape page. */ uint32_t width; /* Maximum window size */ uint32_t height; NPRect clipRect; /* Clipping rectangle in port coordinates */ #if (defined(XP_UNIX) || defined(XP_SYMBIAN)) && !defined(XP_MACOSX) void * ws_info; /* Platform-dependent additional data */ #endif /* XP_UNIX */ NPWindowType type; /* Is this a window or a drawable? */ } NPWindow; typedef struct _NPImageExpose { char* data; /* image pointer */ int32_t stride; /* Stride of data image pointer */ int32_t depth; /* Depth of image pointer */ int32_t x; /* Expose x */ int32_t y; /* Expose y */ uint32_t width; /* Expose width */ uint32_t height; /* Expose height */ NPSize dataSize; /* Data buffer size */ float translateX; /* translate X matrix value */ float translateY; /* translate Y matrix value */ float scaleX; /* scale X matrix value */ float scaleY; /* scale Y matrix value */ } NPImageExpose; typedef struct _NPFullPrint { NPBool pluginPrinted;/* Set TRUE if plugin handled fullscreen printing */ NPBool printOne; /* TRUE if plugin should print one copy to default printer */ void* platformPrint; /* Platform-specific printing info */ } NPFullPrint; typedef struct _NPEmbedPrint { NPWindow window; void* platformPrint; /* Platform-specific printing info */ } NPEmbedPrint; typedef struct _NPPrint { uint16_t mode; /* NP_FULL or NP_EMBED */ union { NPFullPrint fullPrint; /* if mode is NP_FULL */ NPEmbedPrint embedPrint; /* if mode is NP_EMBED */ } print; } NPPrint; #if defined(XP_MACOSX) #ifndef NP_NO_CARBON typedef EventRecord NPEvent; #endif #elif defined(XP_SYMBIAN) typedef QEvent NPEvent; #elif defined(XP_WIN) typedef struct _NPEvent { uint16_t event; uintptr_t wParam; uintptr_t lParam; } NPEvent; #elif defined(XP_OS2) typedef struct _NPEvent { uint32_t event; uint32_t wParam; uint32_t lParam; } NPEvent; #elif defined(XP_UNIX) && defined(MOZ_X11) typedef XEvent NPEvent; #else typedef void* NPEvent; #endif #if defined(XP_MACOSX) typedef void* NPRegion; #ifndef NP_NO_QUICKDRAW typedef RgnHandle NPQDRegion; #endif typedef CGPathRef NPCGRegion; #elif defined(XP_WIN) typedef HRGN NPRegion; #elif defined(XP_UNIX) && defined(MOZ_X11) typedef Region NPRegion; #elif defined(XP_SYMBIAN) typedef QRegion* NPRegion; #else typedef void *NPRegion; #endif typedef struct _NPNSString NPNSString; typedef struct _NPNSWindow NPNSWindow; typedef struct _NPNSMenu NPNSMenu; #if defined(XP_MACOSX) typedef NPNSMenu NPMenu; #else typedef void *NPMenu; #endif typedef enum { NPCoordinateSpacePlugin = 1, NPCoordinateSpaceWindow, NPCoordinateSpaceFlippedWindow, NPCoordinateSpaceScreen, NPCoordinateSpaceFlippedScreen } NPCoordinateSpace; #if defined(XP_MACOSX) #ifndef NP_NO_QUICKDRAW typedef struct NP_Port { CGrafPtr port; int32_t portx; /* position inside the topmost window */ int32_t porty; } NP_Port; #endif /* NP_NO_QUICKDRAW */ /* * NP_CGContext is the type of the NPWindow's 'window' when the plugin specifies NPDrawingModelCoreGraphics * as its drawing model. */ typedef struct NP_CGContext { CGContextRef context; void *window; /* A WindowRef under the Carbon event model. */ } NP_CGContext; /* * NP_GLContext is the type of the NPWindow's 'window' when the plugin specifies NPDrawingModelOpenGL as its * drawing model. */ typedef struct NP_GLContext { CGLContextObj context; #ifdef NP_NO_CARBON NPNSWindow *window; #else void *window; /* Can be either an NSWindow or a WindowRef depending on the event model */ #endif } NP_GLContext; typedef enum { NPCocoaEventDrawRect = 1, NPCocoaEventMouseDown, NPCocoaEventMouseUp, NPCocoaEventMouseMoved, NPCocoaEventMouseEntered, NPCocoaEventMouseExited, NPCocoaEventMouseDragged, NPCocoaEventKeyDown, NPCocoaEventKeyUp, NPCocoaEventFlagsChanged, NPCocoaEventFocusChanged, NPCocoaEventWindowFocusChanged, NPCocoaEventScrollWheel, NPCocoaEventTextInput } NPCocoaEventType; typedef struct _NPCocoaEvent { NPCocoaEventType type; uint32_t version; union { struct { uint32_t modifierFlags; double pluginX; double pluginY; int32_t buttonNumber; int32_t clickCount; double deltaX; double deltaY; double deltaZ; } mouse; struct { uint32_t modifierFlags; NPNSString *characters; NPNSString *charactersIgnoringModifiers; NPBool isARepeat; uint16_t keyCode; } key; struct { CGContextRef context; double x; double y; double width; double height; } draw; struct { NPBool hasFocus; } focus; struct { NPNSString *text; } text; } data; } NPCocoaEvent; #ifndef NP_NO_CARBON /* Non-standard event types that can be passed to HandleEvent */ enum NPEventType { NPEventType_GetFocusEvent = (osEvt + 16), NPEventType_LoseFocusEvent, NPEventType_AdjustCursorEvent, NPEventType_MenuCommandEvent, NPEventType_ClippingChangedEvent, NPEventType_ScrollingBeginsEvent = 1000, NPEventType_ScrollingEndsEvent }; #endif /* NP_NO_CARBON */ #endif /* XP_MACOSX */ /* * Values for mode passed to NPP_New: */ #define NP_EMBED 1 #define NP_FULL 2 /* * Values for stream type passed to NPP_NewStream: */ #define NP_NORMAL 1 #define NP_SEEK 2 #define NP_ASFILE 3 #define NP_ASFILEONLY 4 #define NP_MAXREADY (((unsigned)(~0)<<1)>>1) #if !defined(__LP64__) #if defined(XP_MACOSX) #pragma options align=reset #endif #endif /* __LP64__ */ /*----------------------------------------------------------------------*/ /* Error and Reason Code definitions */ /*----------------------------------------------------------------------*/ /* * Values of type NPError: */ #define NPERR_BASE 0 #define NPERR_NO_ERROR (NPERR_BASE + 0) #define NPERR_GENERIC_ERROR (NPERR_BASE + 1) #define NPERR_INVALID_INSTANCE_ERROR (NPERR_BASE + 2) #define NPERR_INVALID_FUNCTABLE_ERROR (NPERR_BASE + 3) #define NPERR_MODULE_LOAD_FAILED_ERROR (NPERR_BASE + 4) #define NPERR_OUT_OF_MEMORY_ERROR (NPERR_BASE + 5) #define NPERR_INVALID_PLUGIN_ERROR (NPERR_BASE + 6) #define NPERR_INVALID_PLUGIN_DIR_ERROR (NPERR_BASE + 7) #define NPERR_INCOMPATIBLE_VERSION_ERROR (NPERR_BASE + 8) #define NPERR_INVALID_PARAM (NPERR_BASE + 9) #define NPERR_INVALID_URL (NPERR_BASE + 10) #define NPERR_FILE_NOT_FOUND (NPERR_BASE + 11) #define NPERR_NO_DATA (NPERR_BASE + 12) #define NPERR_STREAM_NOT_SEEKABLE (NPERR_BASE + 13) /* * Values of type NPReason: */ #define NPRES_BASE 0 #define NPRES_DONE (NPRES_BASE + 0) #define NPRES_NETWORK_ERR (NPRES_BASE + 1) #define NPRES_USER_BREAK (NPRES_BASE + 2) /* * Don't use these obsolete error codes any more. */ #define NP_NOERR NP_NOERR_is_obsolete_use_NPERR_NO_ERROR #define NP_EINVAL NP_EINVAL_is_obsolete_use_NPERR_GENERIC_ERROR #define NP_EABORT NP_EABORT_is_obsolete_use_NPRES_USER_BREAK /* * Version feature information */ #define NPVERS_HAS_STREAMOUTPUT 8 #define NPVERS_HAS_NOTIFICATION 9 #define NPVERS_HAS_LIVECONNECT 9 #define NPVERS_68K_HAS_LIVECONNECT 11 #define NPVERS_HAS_WINDOWLESS 11 #define NPVERS_HAS_XPCONNECT_SCRIPTING 13 #define NPVERS_HAS_NPRUNTIME_SCRIPTING 14 #define NPVERS_HAS_FORM_VALUES 15 #define NPVERS_HAS_POPUPS_ENABLED_STATE 16 #define NPVERS_HAS_RESPONSE_HEADERS 17 #define NPVERS_HAS_NPOBJECT_ENUM 18 #define NPVERS_HAS_PLUGIN_THREAD_ASYNC_CALL 19 #define NPVERS_HAS_ALL_NETWORK_STREAMS 20 #define NPVERS_HAS_URL_AND_AUTH_INFO 21 #define NPVERS_HAS_PRIVATE_MODE 22 #define NPVERS_MACOSX_HAS_COCOA_EVENTS 23 #define NPVERS_HAS_ADVANCED_KEY_HANDLING 25 #define NPVERS_HAS_URL_REDIRECT_HANDLING 26 /*----------------------------------------------------------------------*/ /* Function Prototypes */ /*----------------------------------------------------------------------*/ #if defined(__OS2__) #define NP_LOADDS _System #else #define NP_LOADDS #endif #ifdef __cplusplus extern "C" { #endif /* NPP_* functions are provided by the plugin and called by the navigator. */ #if defined(XP_UNIX) char* NPP_GetMIMEDescription(void); #endif NPError NP_LOADDS NPP_Initialize(void); void NP_LOADDS NPP_Shutdown(void); NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData* saved); NPError NP_LOADDS NPP_Destroy(NPP instance, NPSavedData** save); NPError NP_LOADDS NPP_SetWindow(NPP instance, NPWindow* window); NPError NP_LOADDS NPP_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16_t* stype); NPError NP_LOADDS NPP_DestroyStream(NPP instance, NPStream* stream, NPReason reason); int32_t NP_LOADDS NPP_WriteReady(NPP instance, NPStream* stream); int32_t NP_LOADDS NPP_Write(NPP instance, NPStream* stream, int32_t offset, int32_t len, void* buffer); void NP_LOADDS NPP_StreamAsFile(NPP instance, NPStream* stream, const char* fname); void NP_LOADDS NPP_Print(NPP instance, NPPrint* platformPrint); int16_t NP_LOADDS NPP_HandleEvent(NPP instance, void* event); void NP_LOADDS NPP_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData); NPError NP_LOADDS NPP_GetValue(NPP instance, NPPVariable variable, void *value); NPError NP_LOADDS NPP_SetValue(NPP instance, NPNVariable variable, void *value); NPBool NP_LOADDS NPP_GotFocus(NPP instance, NPFocusDirection direction); void NP_LOADDS NPP_LostFocus(NPP instance); void NP_LOADDS NPP_URLRedirectNotify(NPP instance, const char* url, int32_t status, void* notifyData); /* NPN_* functions are provided by the navigator and called by the plugin. */ void NP_LOADDS NPN_Version(int* plugin_major, int* plugin_minor, int* netscape_major, int* netscape_minor); NPError NP_LOADDS NPN_GetURLNotify(NPP instance, const char* url, const char* target, void* notifyData); NPError NP_LOADDS NPN_GetURL(NPP instance, const char* url, const char* target); NPError NP_LOADDS NPN_PostURLNotify(NPP instance, const char* url, const char* target, uint32_t len, const char* buf, NPBool file, void* notifyData); NPError NP_LOADDS NPN_PostURL(NPP instance, const char* url, const char* target, uint32_t len, const char* buf, NPBool file); NPError NP_LOADDS NPN_RequestRead(NPStream* stream, NPByteRange* rangeList); NPError NP_LOADDS NPN_NewStream(NPP instance, NPMIMEType type, const char* target, NPStream** stream); int32_t NP_LOADDS NPN_Write(NPP instance, NPStream* stream, int32_t len, void* buffer); NPError NP_LOADDS NPN_DestroyStream(NPP instance, NPStream* stream, NPReason reason); void NP_LOADDS NPN_Status(NPP instance, const char* message); const char* NP_LOADDS NPN_UserAgent(NPP instance); void* NP_LOADDS NPN_MemAlloc(uint32_t size); void NP_LOADDS NPN_MemFree(void* ptr); uint32_t NP_LOADDS NPN_MemFlush(uint32_t size); void NP_LOADDS NPN_ReloadPlugins(NPBool reloadPages); NPError NP_LOADDS NPN_GetValue(NPP instance, NPNVariable variable, void *value); NPError NP_LOADDS NPN_SetValue(NPP instance, NPPVariable variable, void *value); void NP_LOADDS NPN_InvalidateRect(NPP instance, NPRect *invalidRect); void NP_LOADDS NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion); void NP_LOADDS NPN_ForceRedraw(NPP instance); void NP_LOADDS NPN_PushPopupsEnabledState(NPP instance, NPBool enabled); void NP_LOADDS NPN_PopPopupsEnabledState(NPP instance); void NP_LOADDS NPN_PluginThreadAsyncCall(NPP instance, void (*func) (void *), void *userData); NPError NP_LOADDS NPN_GetValueForURL(NPP instance, NPNURLVariable variable, const char *url, char **value, uint32_t *len); NPError NP_LOADDS NPN_SetValueForURL(NPP instance, NPNURLVariable variable, const char *url, const char *value, uint32_t len); NPError NP_LOADDS NPN_GetAuthenticationInfo(NPP instance, const char *protocol, const char *host, int32_t port, const char *scheme, const char *realm, char **username, uint32_t *ulen, char **password, uint32_t *plen); uint32_t NP_LOADDS NPN_ScheduleTimer(NPP instance, uint32_t interval, NPBool repeat, void (*timerFunc)(NPP npp, uint32_t timerID)); void NP_LOADDS NPN_UnscheduleTimer(NPP instance, uint32_t timerID); NPError NP_LOADDS NPN_PopUpContextMenu(NPP instance, NPMenu* menu); NPBool NP_LOADDS NPN_ConvertPoint(NPP instance, double sourceX, double sourceY, NPCoordinateSpace sourceSpace, double *destX, double *destY, NPCoordinateSpace destSpace); NPBool NP_LOADDS NPN_HandleEvent(NPP instance, void *event, NPBool handled); NPBool NP_LOADDS NPN_UnfocusInstance(NPP instance, NPFocusDirection direction); void NP_LOADDS NPN_URLRedirectResponse(NPP instance, void* notifyData, NPBool allow); #ifdef __cplusplus } /* end extern "C" */ #endif #endif /* RC_INVOKED */ #if defined(__OS2__) #pragma pack() #endif #endif /* npapi_h_ */ ================================================ FILE: plugin/npfunctions.h ================================================ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1998 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ #ifndef npfunctions_h_ #define npfunctions_h_ #ifdef __OS2__ #pragma pack(1) #define NP_LOADDS _System #else #define NP_LOADDS #endif #include "npapi.h" #include "npruntime.h" typedef void (* NP_LOADDS NPP_InitializeProcPtr)(); typedef void (* NP_LOADDS NPP_ShutdownProcPtr)(); typedef NPError (* NP_LOADDS NPP_NewProcPtr)(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData* saved); typedef NPError (* NP_LOADDS NPP_DestroyProcPtr)(NPP instance, NPSavedData** save); typedef NPError (* NP_LOADDS NPP_SetWindowProcPtr)(NPP instance, NPWindow* window); typedef NPError (* NP_LOADDS NPP_NewStreamProcPtr)(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16_t* stype); typedef NPError (* NP_LOADDS NPP_DestroyStreamProcPtr)(NPP instance, NPStream* stream, NPReason reason); typedef int32_t (* NP_LOADDS NPP_WriteReadyProcPtr)(NPP instance, NPStream* stream); typedef int32_t (* NP_LOADDS NPP_WriteProcPtr)(NPP instance, NPStream* stream, int32_t offset, int32_t len, void* buffer); typedef void (* NP_LOADDS NPP_StreamAsFileProcPtr)(NPP instance, NPStream* stream, const char* fname); typedef void (* NP_LOADDS NPP_PrintProcPtr)(NPP instance, NPPrint* platformPrint); typedef int16_t (* NP_LOADDS NPP_HandleEventProcPtr)(NPP instance, void* event); typedef void (* NP_LOADDS NPP_URLNotifyProcPtr)(NPP instance, const char* url, NPReason reason, void* notifyData); /* Any NPObjects returned to the browser via NPP_GetValue should be retained by the plugin on the way out. The browser is responsible for releasing. */ typedef NPError (* NP_LOADDS NPP_GetValueProcPtr)(NPP instance, NPPVariable variable, void *ret_value); typedef NPError (* NP_LOADDS NPP_SetValueProcPtr)(NPP instance, NPNVariable variable, void *value); typedef NPError (*NPN_GetValueProcPtr)(NPP instance, NPNVariable variable, void *ret_value); typedef NPError (*NPN_SetValueProcPtr)(NPP instance, NPPVariable variable, void *value); typedef NPError (*NPN_GetURLNotifyProcPtr)(NPP instance, const char* url, const char* window, void* notifyData); typedef NPError (*NPN_PostURLNotifyProcPtr)(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file, void* notifyData); typedef NPError (*NPN_GetURLProcPtr)(NPP instance, const char* url, const char* window); typedef NPError (*NPN_PostURLProcPtr)(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file); typedef NPError (*NPN_RequestReadProcPtr)(NPStream* stream, NPByteRange* rangeList); typedef NPError (*NPN_NewStreamProcPtr)(NPP instance, NPMIMEType type, const char* window, NPStream** stream); typedef int32_t (*NPN_WriteProcPtr)(NPP instance, NPStream* stream, int32_t len, void* buffer); typedef NPError (*NPN_DestroyStreamProcPtr)(NPP instance, NPStream* stream, NPReason reason); typedef void (*NPN_StatusProcPtr)(NPP instance, const char* message); /* Browser manages the lifetime of the buffer returned by NPN_UserAgent, don't depend on it sticking around and don't free it. */ typedef const char* (*NPN_UserAgentProcPtr)(NPP instance); typedef void* (*NPN_MemAllocProcPtr)(uint32_t size); typedef void (*NPN_MemFreeProcPtr)(void* ptr); typedef uint32_t (*NPN_MemFlushProcPtr)(uint32_t size); typedef void (*NPN_ReloadPluginsProcPtr)(NPBool reloadPages); typedef void* (*NPN_GetJavaEnvProcPtr)(); typedef void* (*NPN_GetJavaPeerProcPtr)(NPP instance); typedef void (*NPN_InvalidateRectProcPtr)(NPP instance, NPRect *rect); typedef void (*NPN_InvalidateRegionProcPtr)(NPP instance, NPRegion region); typedef void (*NPN_ForceRedrawProcPtr)(NPP instance); typedef NPIdentifier (*NPN_GetStringIdentifierProcPtr)(const NPUTF8* name); typedef void (*NPN_GetStringIdentifiersProcPtr)(const NPUTF8** names, int32_t nameCount, NPIdentifier* identifiers); typedef NPIdentifier (*NPN_GetIntIdentifierProcPtr)(int32_t intid); typedef bool (*NPN_IdentifierIsStringProcPtr)(NPIdentifier identifier); typedef NPUTF8* (*NPN_UTF8FromIdentifierProcPtr)(NPIdentifier identifier); typedef int32_t (*NPN_IntFromIdentifierProcPtr)(NPIdentifier identifier); typedef NPObject* (*NPN_CreateObjectProcPtr)(NPP npp, NPClass *aClass); typedef NPObject* (*NPN_RetainObjectProcPtr)(NPObject *obj); typedef void (*NPN_ReleaseObjectProcPtr)(NPObject *obj); typedef bool (*NPN_InvokeProcPtr)(NPP npp, NPObject* obj, NPIdentifier methodName, const NPVariant *args, uint32_t argCount, NPVariant *result); typedef bool (*NPN_InvokeDefaultProcPtr)(NPP npp, NPObject* obj, const NPVariant *args, uint32_t argCount, NPVariant *result); typedef bool (*NPN_EvaluateProcPtr)(NPP npp, NPObject *obj, NPString *script, NPVariant *result); typedef bool (*NPN_GetPropertyProcPtr)(NPP npp, NPObject *obj, NPIdentifier propertyName, NPVariant *result); typedef bool (*NPN_SetPropertyProcPtr)(NPP npp, NPObject *obj, NPIdentifier propertyName, const NPVariant *value); typedef bool (*NPN_RemovePropertyProcPtr)(NPP npp, NPObject *obj, NPIdentifier propertyName); typedef bool (*NPN_HasPropertyProcPtr)(NPP npp, NPObject *obj, NPIdentifier propertyName); typedef bool (*NPN_HasMethodProcPtr)(NPP npp, NPObject *obj, NPIdentifier propertyName); typedef void (*NPN_ReleaseVariantValueProcPtr)(NPVariant *variant); typedef void (*NPN_SetExceptionProcPtr)(NPObject *obj, const NPUTF8 *message); typedef bool (*NPN_PushPopupsEnabledStateProcPtr)(NPP npp, NPBool enabled); typedef bool (*NPN_PopPopupsEnabledStateProcPtr)(NPP npp); typedef bool (*NPN_EnumerateProcPtr)(NPP npp, NPObject *obj, NPIdentifier **identifier, uint32_t *count); typedef void (*NPN_PluginThreadAsyncCallProcPtr)(NPP instance, void (*func)(void *), void *userData); typedef bool (*NPN_ConstructProcPtr)(NPP npp, NPObject* obj, const NPVariant *args, uint32_t argCount, NPVariant *result); typedef NPError (*NPN_GetValueForURLPtr)(NPP npp, NPNURLVariable variable, const char *url, char **value, uint32_t *len); typedef NPError (*NPN_SetValueForURLPtr)(NPP npp, NPNURLVariable variable, const char *url, const char *value, uint32_t len); typedef NPError (*NPN_GetAuthenticationInfoPtr)(NPP npp, const char *protocol, const char *host, int32_t port, const char *scheme, const char *realm, char **username, uint32_t *ulen, char **password, uint32_t *plen); typedef struct _NPPluginFuncs { uint16_t size; uint16_t version; NPP_NewProcPtr newp; NPP_DestroyProcPtr destroy; NPP_SetWindowProcPtr setwindow; NPP_NewStreamProcPtr newstream; NPP_DestroyStreamProcPtr destroystream; NPP_StreamAsFileProcPtr asfile; NPP_WriteReadyProcPtr writeready; NPP_WriteProcPtr write; NPP_PrintProcPtr print; NPP_HandleEventProcPtr event; NPP_URLNotifyProcPtr urlnotify; void* javaClass; NPP_GetValueProcPtr getvalue; NPP_SetValueProcPtr setvalue; } NPPluginFuncs; typedef struct _NPNetscapeFuncs { uint16_t size; uint16_t version; NPN_GetURLProcPtr geturl; NPN_PostURLProcPtr posturl; NPN_RequestReadProcPtr requestread; NPN_NewStreamProcPtr newstream; NPN_WriteProcPtr write; NPN_DestroyStreamProcPtr destroystream; NPN_StatusProcPtr status; NPN_UserAgentProcPtr uagent; NPN_MemAllocProcPtr memalloc; NPN_MemFreeProcPtr memfree; NPN_MemFlushProcPtr memflush; NPN_ReloadPluginsProcPtr reloadplugins; NPN_GetJavaEnvProcPtr getJavaEnv; NPN_GetJavaPeerProcPtr getJavaPeer; NPN_GetURLNotifyProcPtr geturlnotify; NPN_PostURLNotifyProcPtr posturlnotify; NPN_GetValueProcPtr getvalue; NPN_SetValueProcPtr setvalue; NPN_InvalidateRectProcPtr invalidaterect; NPN_InvalidateRegionProcPtr invalidateregion; NPN_ForceRedrawProcPtr forceredraw; NPN_GetStringIdentifierProcPtr getstringidentifier; NPN_GetStringIdentifiersProcPtr getstringidentifiers; NPN_GetIntIdentifierProcPtr getintidentifier; NPN_IdentifierIsStringProcPtr identifierisstring; NPN_UTF8FromIdentifierProcPtr utf8fromidentifier; NPN_IntFromIdentifierProcPtr intfromidentifier; NPN_CreateObjectProcPtr createobject; NPN_RetainObjectProcPtr retainobject; NPN_ReleaseObjectProcPtr releaseobject; NPN_InvokeProcPtr invoke; NPN_InvokeDefaultProcPtr invokeDefault; NPN_EvaluateProcPtr evaluate; NPN_GetPropertyProcPtr getproperty; NPN_SetPropertyProcPtr setproperty; NPN_RemovePropertyProcPtr removeproperty; NPN_HasPropertyProcPtr hasproperty; NPN_HasMethodProcPtr hasmethod; NPN_ReleaseVariantValueProcPtr releasevariantvalue; NPN_SetExceptionProcPtr setexception; NPN_PushPopupsEnabledStateProcPtr pushpopupsenabledstate; NPN_PopPopupsEnabledStateProcPtr poppopupsenabledstate; NPN_EnumerateProcPtr enumerate; NPN_PluginThreadAsyncCallProcPtr pluginthreadasynccall; NPN_ConstructProcPtr construct; NPN_GetValueForURLPtr getvalueforurl; NPN_SetValueForURLPtr setvalueforurl; NPN_GetAuthenticationInfoPtr getauthenticationinfo; } NPNetscapeFuncs; #ifdef XP_MACOSX /* * Mac OS X version(s) of NP_GetMIMEDescription(const char *) * These can be called to retreive MIME information from the plugin dynamically * * Note: For compatibility with Quicktime, BPSupportedMIMEtypes is another way * to get mime info from the plugin only on OSX and may not be supported * in furture version -- use NP_GetMIMEDescription instead */ enum { kBPSupportedMIMETypesStructVers_1 = 1 }; typedef struct _BPSupportedMIMETypes { SInt32 structVersion; /* struct version */ Handle typeStrings; /* STR# formated handle, allocated by plug-in */ Handle infoStrings; /* STR# formated handle, allocated by plug-in */ } BPSupportedMIMETypes; OSErr BP_GetSupportedMIMETypes(BPSupportedMIMETypes *mimeInfo, UInt32 flags); #define NP_GETMIMEDESCRIPTION_NAME "NP_GetMIMEDescription" typedef const char* (*NP_GetMIMEDescriptionProcPtr)(); typedef OSErr (*BP_GetSupportedMIMETypesProcPtr)(BPSupportedMIMETypes*, UInt32); #endif #if defined(_WINDOWS) #define OSCALL WINAPI #else #if defined(__OS2__) #define OSCALL _System #else #define OSCALL #endif #endif #if defined(XP_UNIX) /* GCC 3.3 and later support the visibility attribute. */ #if defined(__GNUC__) && ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) #define NP_VISIBILITY_DEFAULT __attribute__((visibility("default"))) #elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) #define NP_VISIBILITY_DEFAULT __global #else #define NP_VISIBILITY_DEFAULT #endif #define NP_EXPORT(__type) NP_VISIBILITY_DEFAULT __type #endif #if defined(_WINDOWS) || defined (__OS2__) #ifdef __cplusplus extern "C" { #endif /* plugin meta member functions */ #if defined(__OS2__) typedef struct _NPPluginData { /* Alternate OS2 Plugin interface */ char *pMimeTypes; char *pFileExtents; char *pFileOpenTemplate; char *pProductName; char *pProductDescription; unsigned long dwProductVersionMS; unsigned long dwProductVersionLS; } NPPluginData; NPError OSCALL NP_GetPluginData(NPPluginData * pPluginData); #endif NPError OSCALL NP_GetEntryPoints(NPPluginFuncs* pFuncs); NPError OSCALL NP_Initialize(NPNetscapeFuncs* bFuncs); NPError OSCALL NP_Shutdown(); char* NP_GetMIMEDescription(); #ifdef __cplusplus } #endif #endif #if defined(__OS2__) #pragma pack() #endif #ifdef XP_UNIX #ifdef __cplusplus extern "C" { #endif NP_EXPORT(char*) NP_GetPluginVersion(); NP_EXPORT(char*) NP_GetMIMEDescription(); #ifdef XP_MACOSX NP_EXPORT(NPError) NP_Initialize(NPNetscapeFuncs* bFuncs); NP_EXPORT(NPError) NP_GetEntryPoints(NPPluginFuncs* pFuncs); #else NP_EXPORT(NPError) NP_Initialize(NPNetscapeFuncs* bFuncs, NPPluginFuncs* pFuncs); #endif NP_EXPORT(NPError) NP_Shutdown(); NP_EXPORT(NPError) NP_GetValue(void *future, NPPVariable aVariable, void *aValue); #ifdef __cplusplus } #endif #endif #endif /* npfunctions_h_ */ ================================================ FILE: plugin/npn_entry.cc ================================================ #include "npfunctions.h" NPNetscapeFuncs* g_npn_funcs; void NP_LOADDS NPN_Version(int* plugin_major, int* plugin_minor, int* netscape_major, int* netscape_minor) { *plugin_major = 1; *plugin_minor = 1; *netscape_major = g_npn_funcs->version >> 8; *netscape_minor = g_npn_funcs->version & 0x00FF; } NPError NP_LOADDS NPN_GetURLNotify(NPP instance, const char* url, const char* target, void* notifyData) { return g_npn_funcs->geturlnotify(instance, url, target, notifyData); } NPError NP_LOADDS NPN_GetURL(NPP instance,const char* url,const char* target) { return g_npn_funcs->geturl(instance, url, target); } NPError NP_LOADDS NPN_PostURLNotify(NPP instance, const char* url, const char* target, uint32_t len, const char* buf, NPBool file, void* notifyData) { return g_npn_funcs->posturlnotify(instance, url, target, len, buf, file, notifyData); } NPError NP_LOADDS NPN_PostURL(NPP instance, const char* url,const char* target, uint32_t len,const char* buf, NPBool file) { return g_npn_funcs->posturl(instance, url, target, len, buf, file); } NPError NP_LOADDS NPN_RequestRead(NPStream* stream, NPByteRange* rangeList) { return g_npn_funcs->requestread(stream, rangeList); } NPError NP_LOADDS NPN_NewStream(NPP instance, NPMIMEType type, const char* target, NPStream** stream) { return g_npn_funcs->newstream(instance, type, target, stream); } int32_t NP_LOADDS NPN_Write(NPP instance, NPStream* stream, int32_t len, void* buffer) { return g_npn_funcs->write(instance, stream, len, buffer); } NPError NP_LOADDS NPN_DestroyStream(NPP instance, NPStream* stream, NPReason reason) { return g_npn_funcs->destroystream(instance, stream, reason); } void NP_LOADDS NPN_Status(NPP instance, const char* message) { g_npn_funcs->status(instance, message); } const char* NP_LOADDS NPN_UserAgent(NPP instance) { return g_npn_funcs->uagent(instance); } void* NP_LOADDS NPN_MemAlloc(uint32_t size) { return g_npn_funcs->memalloc(size); } void NP_LOADDS NPN_MemFree(void* ptr) { return g_npn_funcs->memfree(ptr); } uint32_t NP_LOADDS NPN_MemFlush(uint32_t size) { return g_npn_funcs->memflush(size); } void NP_LOADDS NPN_ReloadPlugins(NPBool reloadPages) { g_npn_funcs->reloadplugins(reloadPages); } NPError NP_LOADDS NPN_GetValue(NPP instance, NPNVariable variable, void *value) { return g_npn_funcs->getvalue(instance, variable, value); } NPError NP_LOADDS NPN_SetValue(NPP instance, NPPVariable variable, void *value) { return g_npn_funcs->setvalue(instance, variable, value); } void NP_LOADDS NPN_InvalidateRect(NPP instance, NPRect *invalidRect) { g_npn_funcs->invalidaterect(instance, invalidRect); } void NP_LOADDS NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion) { g_npn_funcs->invalidateregion(instance, invalidRegion); } void NP_LOADDS NPN_ForceRedraw(NPP instance) { g_npn_funcs->forceredraw(instance); } void NP_LOADDS NPN_PushPopupsEnabledState(NPP instance, NPBool enabled) { g_npn_funcs->pushpopupsenabledstate(instance, enabled); } void NP_LOADDS NPN_PopPopupsEnabledState(NPP instance) { g_npn_funcs->poppopupsenabledstate(instance); } void NP_LOADDS NPN_PluginThreadAsyncCall(NPP instance,void (*func) (void *), void *userData) { g_npn_funcs->pluginthreadasynccall(instance, func, userData); } NPError NP_LOADDS NPN_GetValueForURL(NPP instance, NPNURLVariable variable, const char *url, char **value, uint32_t *len) { return g_npn_funcs->getvalueforurl(instance, variable, url, value, len); } NPError NP_LOADDS NPN_SetValueForURL(NPP instance, NPNURLVariable variable, const char *url, const char *value, uint32_t len) { return g_npn_funcs->setvalueforurl(instance, variable, url, value, len); } NPError NP_LOADDS NPN_GetAuthenticationInfo(NPP instance, const char *protocol, const char *host, int32_t port, const char *scheme, const char *realm, char **username, uint32_t *ulen, char **password, uint32_t *plen) { return g_npn_funcs->getauthenticationinfo(instance, protocol, host, port, scheme, realm, username, ulen, password, plen); } NPObject *NPN_CreateObject(NPP npp, NPClass *aClass) { return g_npn_funcs->createobject(npp, aClass); } NPObject *NPN_RetainObject(NPObject *npobj) { return g_npn_funcs->retainobject(npobj); } void NPN_ReleaseObject(NPObject *npobj) { g_npn_funcs->releaseobject(npobj); } bool NPN_Invoke(NPP npp, NPObject *npobj, NPIdentifier methodName, const NPVariant *args, uint32_t argCount, NPVariant *result) { return g_npn_funcs->invoke(npp, npobj, methodName, args, argCount, result); } bool NPN_InvokeDefault(NPP npp, NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result) { return g_npn_funcs->invokeDefault(npp, npobj, args, argCount, result); } bool NPN_Evaluate(NPP npp, NPObject *npobj, NPString *script, NPVariant *result) { return g_npn_funcs->evaluate(npp, npobj, script, result); } bool NPN_GetProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName, NPVariant *result) { return g_npn_funcs->getproperty(npp, npobj, propertyName, result); } bool NPN_SetProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName, const NPVariant *value) { return g_npn_funcs->setproperty(npp, npobj, propertyName, value); } bool NPN_RemoveProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName) { return g_npn_funcs->removeproperty(npp, npobj, propertyName); } bool NPN_HasProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName) { return g_npn_funcs->hasproperty(npp, npobj, propertyName); } bool NPN_HasMethod(NPP npp, NPObject *npobj, NPIdentifier methodName) { return g_npn_funcs->hasmethod(npp, npobj, methodName); } bool NPN_Enumerate(NPP npp, NPObject *npobj, NPIdentifier **identifier, uint32_t *count) { return g_npn_funcs->enumerate(npp, npobj, identifier, count); } bool NPN_Construct(NPP npp, NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result) { return g_npn_funcs->construct(npp, npobj, args, argCount, result); } void NPN_SetException(NPObject *npobj, const NPUTF8 *message) { g_npn_funcs->setexception(npobj, message); } NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name) { return g_npn_funcs->getstringidentifier(name); } void NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount, NPIdentifier *identifiers) { g_npn_funcs->getstringidentifiers(names, nameCount, identifiers); } NPIdentifier NPN_GetIntIdentifier(int32_t intid) { return g_npn_funcs->getintidentifier(intid); } bool NPN_IdentifierIsString(NPIdentifier identifier) { return g_npn_funcs->identifierisstring(identifier); } NPUTF8 *NPN_UTF8FromIdentifier(NPIdentifier identifier) { return g_npn_funcs->utf8fromidentifier(identifier); } int32_t NPN_IntFromIdentifier(NPIdentifier identifier) { return g_npn_funcs->intfromidentifier(identifier); } void NPN_ReleaseVariantValue(NPVariant *variant) { g_npn_funcs->releasevariantvalue(variant); } ================================================ FILE: plugin/npp_entry.cc ================================================ #include "log.h" #include "npfunctions.h" #include "plugin_base.h" #include "plugin_factory.h" extern Log g_logger; #ifdef XP_UNIX char* NPP_GetMIMEDescription() { return ""; } #endif NPError NP_LOADDS NPP_Initialize() { return NPERR_NO_ERROR; } void NP_LOADDS NPP_Shutdown() { } NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData* saved) { g_logger.WriteLog("msg", "NPP_New"); PluginBase* pPlugin = PluginFactory::NewPlugin(pluginType); if (pPlugin == NULL) return NPERR_OUT_OF_MEMORY_ERROR; else return pPlugin->Init(instance, mode, argc, argn, argv, saved); } NPError NP_LOADDS NPP_Destroy(NPP instance, NPSavedData** save) { g_logger.WriteLog("msg", "NPP_Destory"); PluginBase* pPlugin = (PluginBase*)instance->pdata; return pPlugin->UnInit(save); } NPError NP_LOADDS NPP_SetWindow(NPP instance, NPWindow* window) { PluginBase* pPlugin = (PluginBase*)instance->pdata; return pPlugin->SetWindow(window); } NPError NP_LOADDS NPP_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16_t* stype) { PluginBase* pPlugin = (PluginBase*)instance->pdata; return pPlugin->NewStream(type, stream, seekable, stype); } NPError NP_LOADDS NPP_DestroyStream(NPP instance, NPStream* stream, NPReason reason) { PluginBase* pPlugin = (PluginBase*)instance->pdata; return pPlugin->DestroyStream(stream, reason); } int32_t NP_LOADDS NPP_WriteReady(NPP instance, NPStream* stream) { PluginBase* pPlugin = (PluginBase*)instance->pdata; return pPlugin->WriteReady(stream); } int32_t NP_LOADDS NPP_Write(NPP instance, NPStream* stream, int32_t offset, int32_t len, void* buffer) { PluginBase* pPlugin = (PluginBase*)instance->pdata; return pPlugin->Write(stream, offset, len, buffer); } void NP_LOADDS NPP_StreamAsFile(NPP instance, NPStream* stream, const char* fname) { PluginBase* pPlugin = (PluginBase*)instance->pdata; pPlugin->StreamAsFile(stream, fname); } void NP_LOADDS NPP_Print(NPP instance, NPPrint* platformPrint) { PluginBase* pPlugin = (PluginBase*)instance->pdata; pPlugin->Print(platformPrint); } int16_t NP_LOADDS NPP_HandleEvent(NPP instance, void* event) { PluginBase* pPlugin = (PluginBase*)instance->pdata; return pPlugin->HandleEvent(event); } void NP_LOADDS NPP_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData) { PluginBase* pPlugin = (PluginBase*)instance->pdata; pPlugin->URLNotify(url, reason, notifyData); } NPError NP_LOADDS NPP_GetValue(NPP instance, NPPVariable variable, void *value) { if (instance == NULL) { if (variable == NPPVpluginNameString) *((const char **)value) = "Chrome Fiddler"; else if (variable == NPPVpluginDescriptionString) *((const char **)value) = "Chrome Fiddler Plugin"; else return NPERR_GENERIC_ERROR; } else { PluginBase* pPlugin = (PluginBase*)instance->pdata; return pPlugin->GetValue(variable, value); } return NPERR_NO_ERROR; } NPError NP_LOADDS NPP_SetValue(NPP instance, NPNVariable variable, void *value) { PluginBase* pPlugin = (PluginBase*)instance->pdata; return pPlugin->SetValue(variable, value); } ================================================ FILE: plugin/npruntime.h ================================================ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * Copyright (c) 2004, Apple Computer, Inc. and The Mozilla Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the names of Apple Computer, Inc. ("Apple") or The Mozilla * Foundation ("Mozilla") nor the names of their contributors may be used * to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY APPLE, MOZILLA AND THEIR CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE, MOZILLA OR * THEIR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Revision 1 (March 4, 2004): * Initial proposal. * * Revision 2 (March 10, 2004): * All calls into script were made asynchronous. Results are * provided via the NPScriptResultFunctionPtr callback. * * Revision 3 (March 10, 2004): * Corrected comments to not refer to class retain/release FunctionPtrs. * * Revision 4 (March 11, 2004): * Added additional convenience NPN_SetExceptionWithUTF8(). * Changed NPHasPropertyFunctionPtr and NPHasMethodFunctionPtr to take NPClass * pointers instead of NPObject pointers. * Added NPIsValidIdentifier(). * * Revision 5 (March 17, 2004): * Added context parameter to result callbacks from ScriptObject functions. * * Revision 6 (March 29, 2004): * Renamed functions implemented by user agent to NPN_*. Removed _ from * type names. * Renamed "JavaScript" types to "Script". * * Revision 7 (April 21, 2004): * NPIdentifier becomes a void*, was int32_t * Remove NP_IsValidIdentifier, renamed NP_IdentifierFromUTF8 to NP_GetIdentifier * Added NPVariant and modified functions to use this new type. * * Revision 8 (July 9, 2004): * Updated to joint Apple-Mozilla license. * */ #ifndef _NP_RUNTIME_H_ #define _NP_RUNTIME_H_ #ifdef __cplusplus extern "C" { #endif #include "nptypes.h" /* This API is used to facilitate binding code written in C to script objects. The API in this header does not assume the presence of a user agent. That is, it can be used to bind C code to scripting environments outside of the context of a user agent. However, the normal use of the this API is in the context of a scripting environment running in a browser or other user agent. In particular it is used to support the extended Netscape script-ability API for plugins (NP-SAP). NP-SAP is an extension of the Netscape plugin API. As such we have adopted the use of the "NP" prefix for this API. The following NP{N|P}Variables were added to the Netscape plugin API (in npapi.h): NPNVWindowNPObject NPNVPluginElementNPObject NPPVpluginScriptableNPObject These variables are exposed through NPN_GetValue() and NPP_GetValue() (respectively) and are used to establish the initial binding between the user agent and native code. The DOM objects in the user agent can be examined and manipulated using the NPN_ functions that operate on NPObjects described in this header. To the extent possible the assumptions about the scripting language used by the scripting environment have been minimized. */ #define NP_BEGIN_MACRO do { #define NP_END_MACRO } while (0) /* Objects (non-primitive data) passed between 'C' and script is always wrapped in an NPObject. The 'interface' of an NPObject is described by an NPClass. */ typedef struct NPObject NPObject; typedef struct NPClass NPClass; typedef char NPUTF8; typedef struct _NPString { const NPUTF8 *UTF8Characters; uint32_t UTF8Length; } NPString; typedef enum { NPVariantType_Void, NPVariantType_Null, NPVariantType_Bool, NPVariantType_Int32, NPVariantType_Double, NPVariantType_String, NPVariantType_Object } NPVariantType; typedef struct _NPVariant { NPVariantType type; union { bool boolValue; int32_t intValue; double doubleValue; NPString stringValue; NPObject *objectValue; } value; } NPVariant; /* NPN_ReleaseVariantValue is called on all 'out' parameters references. Specifically it is to be called on variants that own their value, as is the case with all non-const NPVariant* arguments after a successful call to any methods (except this one) in this API. After calling NPN_ReleaseVariantValue, the type of the variant will be NPVariantType_Void. */ void NPN_ReleaseVariantValue(NPVariant *variant); #define NPVARIANT_IS_VOID(_v) ((_v).type == NPVariantType_Void) #define NPVARIANT_IS_NULL(_v) ((_v).type == NPVariantType_Null) #define NPVARIANT_IS_BOOLEAN(_v) ((_v).type == NPVariantType_Bool) #define NPVARIANT_IS_INT32(_v) ((_v).type == NPVariantType_Int32) #define NPVARIANT_IS_DOUBLE(_v) ((_v).type == NPVariantType_Double) #define NPVARIANT_IS_STRING(_v) ((_v).type == NPVariantType_String) #define NPVARIANT_IS_OBJECT(_v) ((_v).type == NPVariantType_Object) #define NPVARIANT_TO_BOOLEAN(_v) ((_v).value.boolValue) #define NPVARIANT_TO_INT32(_v) ((_v).value.intValue) #define NPVARIANT_TO_DOUBLE(_v) ((_v).value.doubleValue) #define NPVARIANT_TO_STRING(_v) ((_v).value.stringValue) #define NPVARIANT_TO_OBJECT(_v) ((_v).value.objectValue) #define VOID_TO_NPVARIANT(_v) \ NP_BEGIN_MACRO \ (_v).type = NPVariantType_Void; \ (_v).value.objectValue = NULL; \ NP_END_MACRO #define NULL_TO_NPVARIANT(_v) \ NP_BEGIN_MACRO \ (_v).type = NPVariantType_Null; \ (_v).value.objectValue = NULL; \ NP_END_MACRO #define BOOLEAN_TO_NPVARIANT(_val, _v) \ NP_BEGIN_MACRO \ (_v).type = NPVariantType_Bool; \ (_v).value.boolValue = !!(_val); \ NP_END_MACRO #define INT32_TO_NPVARIANT(_val, _v) \ NP_BEGIN_MACRO \ (_v).type = NPVariantType_Int32; \ (_v).value.intValue = _val; \ NP_END_MACRO #define DOUBLE_TO_NPVARIANT(_val, _v) \ NP_BEGIN_MACRO \ (_v).type = NPVariantType_Double; \ (_v).value.doubleValue = _val; \ NP_END_MACRO #define STRINGZ_TO_NPVARIANT(_val, _v) \ NP_BEGIN_MACRO \ (_v).type = NPVariantType_String; \ NPString str = { _val, strlen(_val) }; \ (_v).value.stringValue = str; \ NP_END_MACRO #define STRINGN_TO_NPVARIANT(_val, _len, _v) \ NP_BEGIN_MACRO \ (_v).type = NPVariantType_String; \ NPString str = { _val, _len }; \ (_v).value.stringValue = str; \ NP_END_MACRO #define OBJECT_TO_NPVARIANT(_val, _v) \ NP_BEGIN_MACRO \ (_v).type = NPVariantType_Object; \ (_v).value.objectValue = _val; \ NP_END_MACRO /* Type mappings (JavaScript types have been used for illustration purposes): JavaScript to C (NPVariant with type:) undefined NPVariantType_Void null NPVariantType_Null Boolean NPVariantType_Bool Number NPVariantType_Double or NPVariantType_Int32 String NPVariantType_String Object NPVariantType_Object C (NPVariant with type:) to JavaScript NPVariantType_Void undefined NPVariantType_Null null NPVariantType_Bool Boolean NPVariantType_Int32 Number NPVariantType_Double Number NPVariantType_String String NPVariantType_Object Object */ typedef void *NPIdentifier; /* NPObjects have methods and properties. Methods and properties are identified with NPIdentifiers. These identifiers may be reflected in script. NPIdentifiers can be either strings or integers, IOW, methods and properties can be identified by either strings or integers (i.e. foo["bar"] vs foo[1]). NPIdentifiers can be compared using ==. In case of any errors, the requested NPIdentifier(s) will be NULL. NPIdentifier lifetime is controlled by the browser. Plugins do not need to worry about memory management with regards to NPIdentifiers. */ NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name); void NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount, NPIdentifier *identifiers); NPIdentifier NPN_GetIntIdentifier(int32_t intid); bool NPN_IdentifierIsString(NPIdentifier identifier); /* The NPUTF8 returned from NPN_UTF8FromIdentifier SHOULD be freed. */ NPUTF8 *NPN_UTF8FromIdentifier(NPIdentifier identifier); /* Get the integer represented by identifier. If identifier is not an integer identifier, the behaviour is undefined. */ int32_t NPN_IntFromIdentifier(NPIdentifier identifier); /* NPObject behavior is implemented using the following set of callback functions. The NPVariant *result argument of these functions (where applicable) should be released using NPN_ReleaseVariantValue(). */ typedef NPObject *(*NPAllocateFunctionPtr)(NPP npp, NPClass *aClass); typedef void (*NPDeallocateFunctionPtr)(NPObject *npobj); typedef void (*NPInvalidateFunctionPtr)(NPObject *npobj); typedef bool (*NPHasMethodFunctionPtr)(NPObject *npobj, NPIdentifier name); typedef bool (*NPInvokeFunctionPtr)(NPObject *npobj, NPIdentifier name, const NPVariant *args, uint32_t argCount, NPVariant *result); typedef bool (*NPInvokeDefaultFunctionPtr)(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result); typedef bool (*NPHasPropertyFunctionPtr)(NPObject *npobj, NPIdentifier name); typedef bool (*NPGetPropertyFunctionPtr)(NPObject *npobj, NPIdentifier name, NPVariant *result); typedef bool (*NPSetPropertyFunctionPtr)(NPObject *npobj, NPIdentifier name, const NPVariant *value); typedef bool (*NPRemovePropertyFunctionPtr)(NPObject *npobj, NPIdentifier name); typedef bool (*NPEnumerationFunctionPtr)(NPObject *npobj, NPIdentifier **value, uint32_t *count); typedef bool (*NPConstructFunctionPtr)(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result); /* NPObjects returned by create, retain, invoke, and getProperty pass a reference count to the caller. That is, the callee adds a reference count which passes to the caller. It is the caller's responsibility to release the returned object. NPInvokeFunctionPtr function may return 0 to indicate a void result. NPInvalidateFunctionPtr is called by the scripting environment when the native code is shutdown. Any attempt to message a NPObject instance after the invalidate callback has been called will result in undefined behavior, even if the native code is still retaining those NPObject instances. (The runtime will typically return immediately, with 0 or NULL, from an attempt to dispatch to a NPObject, but this behavior should not be depended upon.) The NPEnumerationFunctionPtr function may pass an array of NPIdentifiers back to the caller. The callee allocs the memory of the array using NPN_MemAlloc(), and it's the caller's responsibility to release it using NPN_MemFree(). */ struct NPClass { uint32_t structVersion; NPAllocateFunctionPtr allocate; NPDeallocateFunctionPtr deallocate; NPInvalidateFunctionPtr invalidate; NPHasMethodFunctionPtr hasMethod; NPInvokeFunctionPtr invoke; NPInvokeDefaultFunctionPtr invokeDefault; NPHasPropertyFunctionPtr hasProperty; NPGetPropertyFunctionPtr getProperty; NPSetPropertyFunctionPtr setProperty; NPRemovePropertyFunctionPtr removeProperty; NPEnumerationFunctionPtr enumerate; NPConstructFunctionPtr construct; }; #define NP_CLASS_STRUCT_VERSION 3 #define NP_CLASS_STRUCT_VERSION_ENUM 2 #define NP_CLASS_STRUCT_VERSION_CTOR 3 #define NP_CLASS_STRUCT_VERSION_HAS_ENUM(npclass) \ ((npclass)->structVersion >= NP_CLASS_STRUCT_VERSION_ENUM) #define NP_CLASS_STRUCT_VERSION_HAS_CTOR(npclass) \ ((npclass)->structVersion >= NP_CLASS_STRUCT_VERSION_CTOR) struct NPObject { NPClass *_class; uint32_t referenceCount; /* * Additional space may be allocated here by types of NPObjects */ }; /* If the class has an allocate function, NPN_CreateObject invokes that function, otherwise a NPObject is allocated and returned. This method will initialize the referenceCount member of the NPObject to 1. */ NPObject *NPN_CreateObject(NPP npp, NPClass *aClass); /* Increment the NPObject's reference count. */ NPObject *NPN_RetainObject(NPObject *npobj); /* Decremented the NPObject's reference count. If the reference count goes to zero, the class's destroy function is invoke if specified, otherwise the object is freed directly. */ void NPN_ReleaseObject(NPObject *npobj); /* Functions to access script objects represented by NPObject. Calls to script objects are synchronous. If a function returns a value, it will be supplied via the result NPVariant argument. Successful calls will return true, false will be returned in case of an error. Calls made from plugin code to script must be made from the thread on which the plugin was initialized. */ bool NPN_Invoke(NPP npp, NPObject *npobj, NPIdentifier methodName, const NPVariant *args, uint32_t argCount, NPVariant *result); bool NPN_InvokeDefault(NPP npp, NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result); bool NPN_Evaluate(NPP npp, NPObject *npobj, NPString *script, NPVariant *result); bool NPN_GetProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName, NPVariant *result); bool NPN_SetProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName, const NPVariant *value); bool NPN_RemoveProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName); bool NPN_HasProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName); bool NPN_HasMethod(NPP npp, NPObject *npobj, NPIdentifier methodName); bool NPN_Enumerate(NPP npp, NPObject *npobj, NPIdentifier **identifier, uint32_t *count); bool NPN_Construct(NPP npp, NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result); /* NPN_SetException may be called to trigger a script exception upon return from entry points into NPObjects. Typical usage: NPN_SetException (npobj, message); */ void NPN_SetException(NPObject *npobj, const NPUTF8 *message); #ifdef __cplusplus } #endif #endif ================================================ FILE: plugin/nptypes.h ================================================ /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * mozilla.org. * Portions created by the Initial Developer are Copyright (C) 2004 * the Initial Developer. All Rights Reserved. * * Contributor(s): * Johnny Stenback (Original author) * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ /* * Header file for ensuring that C99 types ([u]int32_t and bool) and * true/false macros are available. */ #if defined(WIN32) || defined(OS2) /* * Win32 and OS/2 don't know C99, so define [u]int_16/32 here. The bool * is predefined tho, both in C and C++. */ typedef short int16_t; typedef unsigned short uint16_t; typedef int int32_t; typedef unsigned int uint32_t; #elif defined(_AIX) || defined(__sun) || defined(__osf__) || defined(IRIX) || defined(HPUX) /* * AIX and SunOS ship a inttypes.h header that defines [u]int32_t, * but not bool for C. */ #include #ifndef __cplusplus typedef int bool; #define true 1 #define false 0 #endif #elif defined(bsdi) || defined(FREEBSD) || defined(OPENBSD) /* * BSD/OS, FreeBSD, and OpenBSD ship sys/types.h that define int32_t and * u_int32_t. */ #include /* * BSD/OS ships no header that defines uint32_t, nor bool (for C) */ #if defined(bsdi) typedef u_int32_t uint32_t; #if !defined(__cplusplus) typedef int bool; #define true 1 #define false 0 #endif #else /* * FreeBSD and OpenBSD define uint32_t and bool. */ #include #include #endif #elif defined(BEOS) #include #else /* * For those that ship a standard C99 stdint.h header file, include * it. Can't do the same for stdbool.h tho, since some systems ship * with a stdbool.h file that doesn't compile! */ #include #ifndef __cplusplus #if !defined(__GNUC__) || (__GNUC__ > 2 || __GNUC_MINOR__ > 95) #include #else /* * GCC 2.91 can't deal with a typedef for bool, but a #define * works. */ #define bool int #define true 1 #define false 0 #endif #endif #endif ================================================ FILE: plugin/plugin_base.cc ================================================ #include "plugin_base.h" PluginBase::PluginBase(void) { } PluginBase::~PluginBase(void) { } NPError PluginBase::Init(NPP instance, uint16_t mode, int16_t argc, char *argn[], char *argv[], NPSavedData *saved) { npp_ = instance; return NPERR_NO_ERROR; } NPError PluginBase::UnInit(NPSavedData** save) { return NPERR_NO_ERROR; } NPError PluginBase::SetWindow(NPWindow* window) { native_window_ = (NativeWindow)window->window; return NPERR_NO_ERROR; } NPError PluginBase::NewStream(NPMIMEType type, NPStream* stream, NPBool seekable, uint16_t* stype) { return NPERR_NO_ERROR; } NPError PluginBase::DestroyStream(NPStream* stream, NPReason reason) { return NPERR_NO_ERROR; } int32_t PluginBase::WriteReady(NPStream* stream) { return 0; } int32_t PluginBase::Write(NPStream* stream, int32_t offset, int32_t len, void* buffer) { return 0; } void PluginBase::StreamAsFile(NPStream* stream, const char* fname) { } void PluginBase::Print(NPPrint* platformPrint) { } int16_t PluginBase::HandleEvent(void* event) { return 0; } void PluginBase::URLNotify(const char* url, NPReason reason, void* notifyData) { } NPError PluginBase::GetValue(NPPVariable variable, void *value) { return NPERR_NO_ERROR; } NPError PluginBase::SetValue(NPNVariable variable, void *value) { return NPERR_NO_ERROR; } ================================================ FILE: plugin/plugin_base.h ================================================ #ifndef PLUGIN_BASE_H_ #define PLUGIN_BASE_H_ #include "npapi.h" #ifdef _WINDOWS typedef HWND NativeWindow; #elif defined MAC #include "npapi.h" typedef NP_CGContext* NativeWindow; #endif class PluginBase { public: PluginBase(void); virtual ~PluginBase(void); virtual NPError Init(NPP instance, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData* saved); virtual NPError UnInit(NPSavedData** save); virtual NPError SetWindow(NPWindow* window); virtual NPError NewStream(NPMIMEType type, NPStream* stream, NPBool seekable, uint16_t* stype); virtual NPError DestroyStream(NPStream* stream, NPReason reason); virtual int32_t WriteReady(NPStream* stream); virtual int32_t Write(NPStream* stream, int32_t offset, int32_t len, void* buffer); virtual void StreamAsFile(NPStream* stream, const char* fname); virtual void Print(NPPrint* platformPrint); virtual int16_t HandleEvent(void* event); virtual void URLNotify(const char* url, NPReason reason, void* notifyData); virtual NPError GetValue(NPPVariable variable, void *value); virtual NPError SetValue(NPNVariable variable, void *value); NPP get_npp() const { return npp_; } void set_npp(NPP npp) { npp_ = npp; } NativeWindow get_native_window() const { return native_window_; } void set_native_window(NativeWindow nw) { native_window_ = nw; } protected: NPP npp_; NativeWindow native_window_; }; #endif // PLUGIN_BASE_H_ ================================================ FILE: plugin/plugin_factory.cc ================================================ #include "plugin_factory.h" #include "chrome_fiddler_plugin.h" PluginFactory::PluginTypeMap PluginFactory::plugin_type_map_; void PluginFactory::Init() { PluginTypeItem item; item.mime_type = "application/x-chromefiddler"; item.constructor = &ChromeFiddlerPlugin::CreateObject; plugin_type_map_.insert(PluginTypeMap::value_type(item.mime_type, item)); } PluginBase* PluginFactory::NewPlugin(NPMIMEType pluginType) { PluginBase* plugin = NULL; PluginTypeMap::iterator iter = plugin_type_map_.find(pluginType); if (iter != plugin_type_map_.end()) plugin = iter->second.constructor(); return plugin; } ================================================ FILE: plugin/plugin_factory.h ================================================ #ifndef PLUGIN_FACTORY_H_ #define PLUGIN_FACTORY_H_ #include #include #include "plugin_base.h" typedef PluginBase* (*ConstructorPtr)(); class PluginFactory { private: PluginFactory(void); ~PluginFactory(void); public: static void Init(); static PluginBase* NewPlugin(NPMIMEType pluginType); public: struct PluginTypeItem { std::string mime_type; ConstructorPtr constructor; }; typedef std::map PluginTypeMap; private: static PluginTypeMap plugin_type_map_; }; #endif ================================================ FILE: plugin/script_object_base.cc ================================================ #include "script_object_base.h" #include "utils.h" bool ScriptObjectBase::HasMethod(NPIdentifier name) { bool ret = false; utils::IdentifiertoString method_name(name); if (method_name.identifier_name()) { FunctionMap::iterator iter = function_map_.find((const char*)method_name); ret = iter != function_map_.end(); } return ret; } bool ScriptObjectBase::Invoke(NPIdentifier name,const NPVariant *args, uint32_t argCount,NPVariant *result) { bool ret = false; utils::IdentifiertoString method_name(name); if (method_name.identifier_name()) { FunctionMap::iterator iter = function_map_.find((const char*)method_name); if (iter != function_map_.end()) ret = (this->*(iter->second.function_pointer))(args, argCount, result); } return ret; } bool ScriptObjectBase::HasProperty(NPIdentifier name) { bool ret = false; utils::IdentifiertoString property_name(name); if (property_name.identifier_name()) { PropertyMap::iterator iter = property_map_.find((const char*)property_name); ret = iter != property_map_.end(); } return ret; } bool ScriptObjectBase::GetProperty(NPIdentifier name, NPVariant *result) { bool ret = false; utils::IdentifiertoString property_name(name); if (property_name.identifier_name()) { PropertyMap::iterator iter = property_map_.find((const char*)property_name); if (iter != property_map_.end()) { *result = iter->second.property_value; ret = true; } } return ret; } bool ScriptObjectBase::SetProperty(NPIdentifier name, const NPVariant *value) { bool ret = false; utils::IdentifiertoString property_name(name); if (property_name.identifier_name()) { PropertyMap::iterator iter = property_map_.find((const char*)property_name); if (iter != property_map_.end()) { iter->second.property_value = *value; ret = true; } } return ret; } bool ScriptObjectBase::RemoveProperty(NPIdentifier name) { bool ret = false; utils::IdentifiertoString property_name(name); if (property_name.identifier_name()) { PropertyMap::iterator iter = property_map_.find((const char*)property_name); if (iter != property_map_.end()) { property_map_.erase(iter); ret = true; } } return ret; } void ScriptObjectBase::AddProperty(PropertyItem& item) { PropertyMap::iterator iter = property_map_.find(item.property_name); if (iter != property_map_.end()) return; property_map_.insert(PropertyMap::value_type(item.property_name, item)); } void ScriptObjectBase::AddFunction(FunctionItem& item) { FunctionMap::iterator iter = function_map_.find(item.function_name); if (iter != function_map_.end()) return; function_map_.insert(FunctionMap::value_type(item.function_name, item)); } ================================================ FILE: plugin/script_object_base.h ================================================ #ifndef SCRIPT_OBJECT_BASE_H_ #define SCRIPT_OBJECT_BASE_H_ #include #include #include "npapi.h" #include "npruntime.h" #include "plugin_base.h" class ScriptObjectBase : public NPObject { public: ScriptObjectBase(void) {} virtual ~ScriptObjectBase(void) {} typedef bool (ScriptObjectBase::*InvokePtr)(const NPVariant *args, uint32_t argCount, NPVariant *result); struct FunctionItem { std::string function_name; InvokePtr function_pointer; }; struct PropertyItem { std::string property_name; NPVariant property_value; }; virtual void Deallocate() = 0; virtual void Invalidate() = 0; virtual bool HasMethod(NPIdentifier name); virtual bool Invoke(NPIdentifier name, const NPVariant *args, uint32_t argCount, NPVariant *result); virtual bool InvokeDefault(const NPVariant *args, uint32_t argCount, NPVariant *result) { return false; } virtual bool HasProperty(NPIdentifier name); virtual bool GetProperty(NPIdentifier name, NPVariant *result); virtual bool SetProperty(NPIdentifier name, const NPVariant *value); virtual bool RemoveProperty(NPIdentifier name); virtual bool Enumerate(NPIdentifier **value, uint32_t *count) { return false; } virtual bool Construct(const NPVariant *args, uint32_t argCount, NPVariant *result) = 0; virtual void InitHandler() {} protected: void AddProperty(PropertyItem& item); void AddFunction(FunctionItem& item); void set_plugin(PluginBase* plug) { plugin_ = plug; } PluginBase* get_plugin() { return plugin_; } private: typedef std::map FunctionMap; typedef std::map PropertyMap; FunctionMap function_map_; PropertyMap property_map_; PluginBase* plugin_; }; #define ON_INVOKEHELPER(_funPtr) \ static_cast(_funPtr) #endif ================================================ FILE: plugin/script_object_factory.cc ================================================ #include "script_object_factory.h" NPClass ScriptObjectFactory::npclass_ = { NP_CLASS_STRUCT_VERSION, ScriptObjectFactory::Allocate, ScriptObjectFactory::Deallocate, ScriptObjectFactory::Invalidate, ScriptObjectFactory::HasMethod, ScriptObjectFactory::Invoke, ScriptObjectFactory::InvokeDefault, ScriptObjectFactory::HasProperty, ScriptObjectFactory::GetProperty, ScriptObjectFactory::SetProperty, ScriptObjectFactory::RemoveProperty, ScriptObjectFactory::Enumerate, ScriptObjectFactory::Construct }; ScriptObjectFactory::ScriptObjectFactory(void) { } ScriptObjectFactory::~ScriptObjectFactory(void) { } ScriptObjectBase* ScriptObjectFactory::CreateObject(NPP npp, NPAllocateFunctionPtr allocate) { npclass_.allocate = allocate; ScriptObjectBase* object = (ScriptObjectBase*)NPN_CreateObject(npp, &npclass_); if (object) { object->InitHandler(); } return object; } NPObject* ScriptObjectFactory::Allocate(NPP npp, NPClass *aClass) { return NULL; } void ScriptObjectFactory::Deallocate(NPObject *npobj) { ScriptObjectBase* pObject = (ScriptObjectBase*)npobj; pObject->Deallocate(); } void ScriptObjectFactory::Invalidate(NPObject *npobj) { ScriptObjectBase* pObject = (ScriptObjectBase*)npobj; pObject->Invalidate(); } bool ScriptObjectFactory::HasMethod(NPObject *npobj, NPIdentifier name) { ScriptObjectBase* pObject = (ScriptObjectBase*)npobj; return pObject->HasMethod(name); } bool ScriptObjectFactory::Invoke(NPObject *npobj, NPIdentifier name, const NPVariant *args, uint32_t argCount, NPVariant *result) { ScriptObjectBase* pObject = (ScriptObjectBase*)npobj; return pObject->Invoke(name, args, argCount, result); } bool ScriptObjectFactory::InvokeDefault(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result) { ScriptObjectBase* pObject = (ScriptObjectBase*)npobj; return pObject->InvokeDefault(args, argCount, result); } bool ScriptObjectFactory::HasProperty(NPObject *npobj, NPIdentifier name) { ScriptObjectBase* pObject = (ScriptObjectBase*)npobj; return pObject->HasProperty(name); } bool ScriptObjectFactory::GetProperty(NPObject *npobj, NPIdentifier name, NPVariant *result) { ScriptObjectBase* pObject = (ScriptObjectBase*)npobj; return pObject->GetProperty(name, result); } bool ScriptObjectFactory::SetProperty(NPObject *npobj, NPIdentifier name, const NPVariant *value) { ScriptObjectBase* pObject = (ScriptObjectBase*)npobj; return pObject->SetProperty(name, value); } bool ScriptObjectFactory::RemoveProperty(NPObject *npobj, NPIdentifier name) { ScriptObjectBase* pObject = (ScriptObjectBase*)npobj; return pObject->RemoveProperty(name); } bool ScriptObjectFactory::Enumerate(NPObject *npobj, NPIdentifier **value, uint32_t *count) { ScriptObjectBase* pObject = (ScriptObjectBase*)npobj; return pObject->Enumerate(value, count); } bool ScriptObjectFactory::Construct(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result) { ScriptObjectBase* pObject = (ScriptObjectBase*)npobj; return pObject->Construct(args, argCount, result); } ================================================ FILE: plugin/script_object_factory.h ================================================ #ifndef SCRIPT_OBJECT_FACTORY_H_ #define SCRIPT_OBJECT_FACTORY_H_ #include "script_object_base.h" class ScriptObjectFactory { public: ScriptObjectFactory(void); ~ScriptObjectFactory(void); static ScriptObjectBase* CreateObject(NPP npp, NPAllocateFunctionPtr allocate); private: static NPObject* Allocate(NPP npp, NPClass *aClass); static void Deallocate(NPObject *npobj); static void Invalidate(NPObject *npobj); static bool HasMethod(NPObject *npobj, NPIdentifier name); static bool Invoke(NPObject *npobj, NPIdentifier name, const NPVariant *args, uint32_t argCount, NPVariant *result); static bool InvokeDefault(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result); static bool HasProperty(NPObject *npobj, NPIdentifier name); static bool GetProperty(NPObject *npobj, NPIdentifier name, NPVariant *result); static bool SetProperty(NPObject *npobj, NPIdentifier name, const NPVariant *value); static bool RemoveProperty(NPObject *npobj, NPIdentifier name); static bool Enumerate(NPObject *npobj, NPIdentifier **value, uint32_t *count); static bool Construct(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result); private: static NPClass npclass_; }; #endif // SCRIPT_OBJECT_FACTORY_H_ ================================================ FILE: plugin/utils.h ================================================ #ifndef UTIL_H_ #define UTIL_H_ #ifdef _WINDOWS #include #endif #include "npfunctions.h" namespace utils { class IdentifiertoString { public: explicit IdentifiertoString(NPIdentifier identifier) : identifier_name_(NULL) { identifier_name_ = NPN_UTF8FromIdentifier(identifier); } const char* identifier_name() const { return identifier_name_; } operator const char*() const { return identifier_name_; } ~IdentifiertoString() { if (identifier_name_) NPN_MemFree(identifier_name_); } private: // Disable evil constructors. IdentifiertoString(); IdentifiertoString(const IdentifiertoString&); char* identifier_name_; }; #ifdef _WINDOWS class Utf8ToUnicode { public: explicit Utf8ToUnicode(const char* utf8data, unsigned int datalen = -1) : buffer_(NULL) { int size = MultiByteToWideChar(CP_UTF8, 0, utf8data, datalen, 0, 0); if (size > 0) buffer_ = new WCHAR[size + 1]; if (buffer_) { MultiByteToWideChar(CP_UTF8, 0, utf8data, datalen, buffer_, size); buffer_[size] = 0; } } operator WCHAR*() const { return buffer_; } WCHAR** operator &() { return &buffer_; } ~Utf8ToUnicode() { if (buffer_) delete[] buffer_; } private: Utf8ToUnicode(); Utf8ToUnicode(const Utf8ToUnicode&); WCHAR* buffer_; }; #endif } #endif ================================================ FILE: src/bin/chrome_fiddler.plugin/Contents/Info.plist ================================================ CFBundleDevelopmentRegion English CFBundleExecutable chrome_fiddler CFBundleGetInfoString 420+, Copyright 2006-2009 Apple Inc. CFBundleIconFile CFBundleIdentifier chrome.chrome_fiddler CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType BRPL CFBundleShortVersionString 1.0 CFBundleSignature ???? CFBundleVersion 1.0 CFPlugInDynamicRegisterFunction CFPlugInDynamicRegistration NO CFPlugInFactories 00000000-0000-0000-0000-000000000000 MyFactoryFunction CFPlugInTypes 00000000-0000-0000-0000-000000000000 00000000-0000-0000-0000-000000000000 CFPlugInUnloadFunction WebPluginDescription Chrome Fiddler Extension Plugin WebPluginMIMETypes application/x-chromefiddler WebPluginExtensions chrome_fiddler WebPluginTypeDescription Chrome Fiddler Extension Plugin WebPluginName Chrome Fiddler Extension Plugin ================================================ FILE: src/css/lib/bootstrap.css ================================================ /*! * Bootstrap v2.3.2 * * Copyright 2012 Twitter, Inc * Licensed under the Apache License v2.0 * http://www.apache.org/licenses/LICENSE-2.0 * * Designed and built with all the love in the world @twitter by @mdo and @fat. */ .clearfix { *zoom: 1; } .clearfix:before, .clearfix:after { display: table; line-height: 0; content: ""; } .clearfix:after { clear: both; } .hide-text { font: 0/0 a; color: transparent; text-shadow: none; background-color: transparent; border: 0; } .input-block-level { display: block; width: 100%; min-height: 30px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; } audio, canvas, video { display: inline-block; *display: inline; *zoom: 1; } audio:not([controls]) { display: none; } html { font-size: 100%; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; } a:focus { outline: thin dotted #333; outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px; } a:hover, a:active { outline: 0; } sub, sup { position: relative; font-size: 75%; line-height: 0; vertical-align: baseline; } sup { top: -0.5em; } sub { bottom: -0.25em; } img { width: auto\9; height: auto; max-width: 100%; vertical-align: middle; border: 0; -ms-interpolation-mode: bicubic; } #map_canvas img, .google-maps img { max-width: none; } button, input, select, textarea { margin: 0; font-size: 100%; vertical-align: middle; } button, input { *overflow: visible; line-height: normal; } button::-moz-focus-inner, input::-moz-focus-inner { padding: 0; border: 0; } button, html input[type="button"], input[type="reset"], input[type="submit"] { cursor: pointer; -webkit-appearance: button; } label, select, button, input[type="button"], input[type="reset"], input[type="submit"], input[type="radio"], input[type="checkbox"] { cursor: pointer; } input[type="search"] { -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; -webkit-appearance: textfield; } input[type="search"]::-webkit-search-decoration, input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; } textarea { overflow: auto; vertical-align: top; } @media print { * { color: #000 !important; text-shadow: none !important; background: transparent !important; box-shadow: none !important; } a, a:visited { text-decoration: underline; } a[href]:after { content: " (" attr(href) ")"; } abbr[title]:after { content: " (" attr(title) ")"; } .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } pre, blockquote { border: 1px solid #999; page-break-inside: avoid; } thead { display: table-header-group; } tr, img { page-break-inside: avoid; } img { max-width: 100% !important; } @page { margin: 0.5cm; } p, h2, h3 { orphans: 3; widows: 3; } h2, h3 { page-break-after: avoid; } } body { margin: 0; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; color: #333333; background-color: #ffffff; } a { color: #0088cc; text-decoration: none; } a:hover, a:focus { color: #005580; text-decoration: underline; } .img-rounded { -webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px; } .img-polaroid { padding: 4px; background-color: #fff; border: 1px solid #ccc; border: 1px solid rgba(0, 0, 0, 0.2); -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); } .img-circle { -webkit-border-radius: 500px; -moz-border-radius: 500px; border-radius: 500px; } .row { margin-left: -20px; *zoom: 1; } .row:before, .row:after { display: table; line-height: 0; content: ""; } .row:after { clear: both; } [class*="span"] { float: left; min-height: 1px; margin-left: 20px; } .container, .navbar-static-top .container, .navbar-fixed-top .container, .navbar-fixed-bottom .container { width: 940px; } .span12 { width: 940px; } .span11 { width: 860px; } .span10 { width: 780px; } .span9 { width: 700px; } .span8 { width: 620px; } .span7 { width: 540px; } .span6 { width: 460px; } .span5 { width: 380px; } .span4 { width: 300px; } .span3 { width: 220px; } .span2 { width: 140px; } .span1 { width: 60px; } .offset12 { margin-left: 980px; } .offset11 { margin-left: 900px; } .offset10 { margin-left: 820px; } .offset9 { margin-left: 740px; } .offset8 { margin-left: 660px; } .offset7 { margin-left: 580px; } .offset6 { margin-left: 500px; } .offset5 { margin-left: 420px; } .offset4 { margin-left: 340px; } .offset3 { margin-left: 260px; } .offset2 { margin-left: 180px; } .offset1 { margin-left: 100px; } .row-fluid { width: 100%; *zoom: 1; } .row-fluid:before, .row-fluid:after { display: table; line-height: 0; content: ""; } .row-fluid:after { clear: both; } .row-fluid [class*="span"] { display: block; float: left; width: 100%; min-height: 30px; margin-left: 2.127659574468085%; *margin-left: 2.074468085106383%; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } .row-fluid [class*="span"]:first-child { margin-left: 0; } .row-fluid .controls-row [class*="span"] + [class*="span"] { margin-left: 2.127659574468085%; } .row-fluid .span12 { width: 100%; *width: 99.94680851063829%; } .row-fluid .span11 { width: 91.48936170212765%; *width: 91.43617021276594%; } .row-fluid .span10 { width: 82.97872340425532%; *width: 82.92553191489361%; } .row-fluid .span9 { width: 74.46808510638297%; *width: 74.41489361702126%; } .row-fluid .span8 { width: 65.95744680851064%; *width: 65.90425531914893%; } .row-fluid .span7 { width: 57.44680851063829%; *width: 57.39361702127659%; } .row-fluid .span6 { width: 48.93617021276595%; *width: 48.88297872340425%; } .row-fluid .span5 { width: 40.42553191489362%; *width: 40.37234042553192%; } .row-fluid .span4 { width: 31.914893617021278%; *width: 31.861702127659576%; } .row-fluid .span3 { width: 23.404255319148934%; *width: 23.351063829787233%; } .row-fluid .span2 { width: 14.893617021276595%; *width: 14.840425531914894%; } .row-fluid .span1 { width: 6.382978723404255%; *width: 6.329787234042553%; } .row-fluid .offset12 { margin-left: 104.25531914893617%; *margin-left: 104.14893617021275%; } .row-fluid .offset12:first-child { margin-left: 102.12765957446808%; *margin-left: 102.02127659574467%; } .row-fluid .offset11 { margin-left: 95.74468085106382%; *margin-left: 95.6382978723404%; } .row-fluid .offset11:first-child { margin-left: 93.61702127659574%; *margin-left: 93.51063829787232%; } .row-fluid .offset10 { margin-left: 87.23404255319149%; *margin-left: 87.12765957446807%; } .row-fluid .offset10:first-child { margin-left: 85.1063829787234%; *margin-left: 84.99999999999999%; } .row-fluid .offset9 { margin-left: 78.72340425531914%; *margin-left: 78.61702127659572%; } .row-fluid .offset9:first-child { margin-left: 76.59574468085106%; *margin-left: 76.48936170212764%; } .row-fluid .offset8 { margin-left: 70.2127659574468%; *margin-left: 70.10638297872339%; } .row-fluid .offset8:first-child { margin-left: 68.08510638297872%; *margin-left: 67.9787234042553%; } .row-fluid .offset7 { margin-left: 61.70212765957446%; *margin-left: 61.59574468085106%; } .row-fluid .offset7:first-child { margin-left: 59.574468085106375%; *margin-left: 59.46808510638297%; } .row-fluid .offset6 { margin-left: 53.191489361702125%; *margin-left: 53.085106382978715%; } .row-fluid .offset6:first-child { margin-left: 51.063829787234035%; *margin-left: 50.95744680851063%; } .row-fluid .offset5 { margin-left: 44.68085106382979%; *margin-left: 44.57446808510638%; } .row-fluid .offset5:first-child { margin-left: 42.5531914893617%; *margin-left: 42.4468085106383%; } .row-fluid .offset4 { margin-left: 36.170212765957444%; *margin-left: 36.06382978723405%; } .row-fluid .offset4:first-child { margin-left: 34.04255319148936%; *margin-left: 33.93617021276596%; } .row-fluid .offset3 { margin-left: 27.659574468085104%; *margin-left: 27.5531914893617%; } .row-fluid .offset3:first-child { margin-left: 25.53191489361702%; *margin-left: 25.425531914893618%; } .row-fluid .offset2 { margin-left: 19.148936170212764%; *margin-left: 19.04255319148936%; } .row-fluid .offset2:first-child { margin-left: 17.02127659574468%; *margin-left: 16.914893617021278%; } .row-fluid .offset1 { margin-left: 10.638297872340425%; *margin-left: 10.53191489361702%; } .row-fluid .offset1:first-child { margin-left: 8.51063829787234%; *margin-left: 8.404255319148938%; } [class*="span"].hide, .row-fluid [class*="span"].hide { display: none; } [class*="span"].pull-right, .row-fluid [class*="span"].pull-right { float: right; } .container { margin-right: auto; margin-left: auto; *zoom: 1; } .container:before, .container:after { display: table; line-height: 0; content: ""; } .container:after { clear: both; } .container-fluid { padding-right: 20px; padding-left: 20px; *zoom: 1; } .container-fluid:before, .container-fluid:after { display: table; line-height: 0; content: ""; } .container-fluid:after { clear: both; } p { margin: 0 0 10px; } .lead { margin-bottom: 20px; font-size: 21px; font-weight: 200; line-height: 30px; } small { font-size: 85%; } strong { font-weight: bold; } em { font-style: italic; } cite { font-style: normal; } .muted { color: #999999; } a.muted:hover, a.muted:focus { color: #808080; } .text-warning { color: #c09853; } a.text-warning:hover, a.text-warning:focus { color: #a47e3c; } .text-error { color: #b94a48; } a.text-error:hover, a.text-error:focus { color: #953b39; } .text-info { color: #3a87ad; } a.text-info:hover, a.text-info:focus { color: #2d6987; } .text-success { color: #468847; } a.text-success:hover, a.text-success:focus { color: #356635; } .text-left { text-align: left; } .text-right { text-align: right; } .text-center { text-align: center; } h1, h2, h3, h4, h5, h6 { margin: 10px 0; font-family: inherit; font-weight: bold; line-height: 20px; color: inherit; text-rendering: optimizelegibility; } h1 small, h2 small, h3 small, h4 small, h5 small, h6 small { font-weight: normal; line-height: 1; color: #999999; } h1, h2, h3 { line-height: 40px; } h1 { font-size: 38.5px; } h2 { font-size: 31.5px; } h3 { font-size: 24.5px; } h4 { font-size: 17.5px; } h5 { font-size: 14px; } h6 { font-size: 11.9px; } h1 small { font-size: 24.5px; } h2 small { font-size: 17.5px; } h3 small { font-size: 14px; } h4 small { font-size: 14px; } .page-header { padding-bottom: 9px; margin: 20px 0 30px; border-bottom: 1px solid #eeeeee; } ul, ol { padding: 0; margin: 0 0 10px 25px; } ul ul, ul ol, ol ol, ol ul { margin-bottom: 0; } li { line-height: 20px; } ul.unstyled, ol.unstyled { margin-left: 0; list-style: none; } ul.inline, ol.inline { margin-left: 0; list-style: none; } ul.inline > li, ol.inline > li { display: inline-block; *display: inline; padding-right: 5px; padding-left: 5px; *zoom: 1; } dl { margin-bottom: 20px; } dt, dd { line-height: 20px; } dt { font-weight: bold; } dd { margin-left: 10px; } .dl-horizontal { *zoom: 1; } .dl-horizontal:before, .dl-horizontal:after { display: table; line-height: 0; content: ""; } .dl-horizontal:after { clear: both; } .dl-horizontal dt { float: left; width: 160px; overflow: hidden; clear: left; text-align: right; text-overflow: ellipsis; white-space: nowrap; } .dl-horizontal dd { margin-left: 180px; } hr { margin: 20px 0; border: 0; border-top: 1px solid #eeeeee; border-bottom: 1px solid #ffffff; } abbr[title], abbr[data-original-title] { cursor: help; border-bottom: 1px dotted #999999; } abbr.initialism { font-size: 90%; text-transform: uppercase; } blockquote { padding: 0 0 0 15px; margin: 0 0 20px; border-left: 5px solid #eeeeee; } blockquote p { margin-bottom: 0; font-size: 17.5px; font-weight: 300; line-height: 1.25; } blockquote small { display: block; line-height: 20px; color: #999999; } blockquote small:before { content: '\2014 \00A0'; } blockquote.pull-right { float: right; padding-right: 15px; padding-left: 0; border-right: 5px solid #eeeeee; border-left: 0; } blockquote.pull-right p, blockquote.pull-right small { text-align: right; } blockquote.pull-right small:before { content: ''; } blockquote.pull-right small:after { content: '\00A0 \2014'; } q:before, q:after, blockquote:before, blockquote:after { content: ""; } address { display: block; margin-bottom: 20px; font-style: normal; line-height: 20px; } code, pre { padding: 0 3px 2px; font-family: Monaco, Menlo, Consolas, "Courier New", monospace; font-size: 12px; color: #333333; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; } code { padding: 2px 4px; color: #d14; white-space: nowrap; background-color: #f7f7f9; border: 1px solid #e1e1e8; } pre { display: block; padding: 9.5px; margin: 0 0 10px; font-size: 13px; line-height: 20px; word-break: break-all; word-wrap: break-word; white-space: pre; white-space: pre-wrap; background-color: #f5f5f5; border: 1px solid #ccc; border: 1px solid rgba(0, 0, 0, 0.15); -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } pre.prettyprint { margin-bottom: 20px; } pre code { padding: 0; color: inherit; white-space: pre; white-space: pre-wrap; background-color: transparent; border: 0; } .pre-scrollable { max-height: 340px; overflow-y: scroll; } form { margin: 0 0 20px; } fieldset { padding: 0; margin: 0; border: 0; } legend { display: block; width: 100%; padding: 0; margin-bottom: 20px; font-size: 21px; line-height: 40px; color: #333333; border: 0; border-bottom: 1px solid #e5e5e5; } legend small { font-size: 15px; color: #999999; } label, input, button, select, textarea { font-size: 14px; font-weight: normal; line-height: 20px; } input, button, select, textarea { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } label { display: block; margin-bottom: 5px; } select, textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input { display: inline-block; height: 20px; padding: 4px 6px; margin-bottom: 10px; font-size: 14px; line-height: 20px; color: #555555; vertical-align: middle; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } input, textarea, .uneditable-input { width: 206px; } textarea { height: auto; } textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input { background-color: #ffffff; border: 1px solid #cccccc; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -webkit-transition: border linear 0.2s, box-shadow linear 0.2s; -moz-transition: border linear 0.2s, box-shadow linear 0.2s; -o-transition: border linear 0.2s, box-shadow linear 0.2s; transition: border linear 0.2s, box-shadow linear 0.2s; } textarea:focus, input[type="text"]:focus, input[type="password"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="date"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, input[type="number"]:focus, input[type="email"]:focus, input[type="url"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="color"]:focus, .uneditable-input:focus { border-color: rgba(82, 168, 236, 0.8); outline: 0; outline: thin dotted \9; /* IE6-9 */ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); } input[type="radio"], input[type="checkbox"] { margin: 4px 0 0; margin-top: 1px \9; *margin-top: 0; line-height: normal; } input[type="file"], input[type="image"], input[type="submit"], input[type="reset"], input[type="button"], input[type="radio"], input[type="checkbox"] { width: auto; } select, input[type="file"] { height: 30px; /* In IE7, the height of the select element cannot be changed by height, only font-size */ *margin-top: 4px; /* For IE7, add top margin to align select with labels */ line-height: 30px; } select { width: 220px; background-color: #ffffff; border: 1px solid #cccccc; } select[multiple], select[size] { height: auto; } select:focus, input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focus { outline: thin dotted #333; outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px; } .uneditable-input, .uneditable-textarea { color: #999999; cursor: not-allowed; background-color: #fcfcfc; border-color: #cccccc; -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); } .uneditable-input { overflow: hidden; white-space: nowrap; } .uneditable-textarea { width: auto; height: auto; } input:-moz-placeholder, textarea:-moz-placeholder { color: #999999; } input:-ms-input-placeholder, textarea:-ms-input-placeholder { color: #999999; } input::-webkit-input-placeholder, textarea::-webkit-input-placeholder { color: #999999; } .radio, .checkbox { min-height: 20px; padding-left: 20px; } .radio input[type="radio"], .checkbox input[type="checkbox"] { float: left; margin-left: -20px; } .controls > .radio:first-child, .controls > .checkbox:first-child { padding-top: 5px; } .radio.inline, .checkbox.inline { display: inline-block; padding-top: 5px; margin-bottom: 0; vertical-align: middle; } .radio.inline + .radio.inline, .checkbox.inline + .checkbox.inline { margin-left: 10px; } .input-mini { width: 60px; } .input-small { width: 90px; } .input-medium { width: 150px; } .input-large { width: 210px; } .input-xlarge { width: 270px; } .input-xxlarge { width: 530px; } input[class*="span"], select[class*="span"], textarea[class*="span"], .uneditable-input[class*="span"], .row-fluid input[class*="span"], .row-fluid select[class*="span"], .row-fluid textarea[class*="span"], .row-fluid .uneditable-input[class*="span"] { float: none; margin-left: 0; } .input-append input[class*="span"], .input-append .uneditable-input[class*="span"], .input-prepend input[class*="span"], .input-prepend .uneditable-input[class*="span"], .row-fluid input[class*="span"], .row-fluid select[class*="span"], .row-fluid textarea[class*="span"], .row-fluid .uneditable-input[class*="span"], .row-fluid .input-prepend [class*="span"], .row-fluid .input-append [class*="span"] { display: inline-block; } input, textarea, .uneditable-input { margin-left: 0; } .controls-row [class*="span"] + [class*="span"] { margin-left: 20px; } input.span12, textarea.span12, .uneditable-input.span12 { width: 926px; } input.span11, textarea.span11, .uneditable-input.span11 { width: 846px; } input.span10, textarea.span10, .uneditable-input.span10 { width: 766px; } input.span9, textarea.span9, .uneditable-input.span9 { width: 686px; } input.span8, textarea.span8, .uneditable-input.span8 { width: 606px; } input.span7, textarea.span7, .uneditable-input.span7 { width: 526px; } input.span6, textarea.span6, .uneditable-input.span6 { width: 446px; } input.span5, textarea.span5, .uneditable-input.span5 { width: 366px; } input.span4, textarea.span4, .uneditable-input.span4 { width: 286px; } input.span3, textarea.span3, .uneditable-input.span3 { width: 206px; } input.span2, textarea.span2, .uneditable-input.span2 { width: 126px; } input.span1, textarea.span1, .uneditable-input.span1 { width: 46px; } .controls-row { *zoom: 1; } .controls-row:before, .controls-row:after { display: table; line-height: 0; content: ""; } .controls-row:after { clear: both; } .controls-row [class*="span"], .row-fluid .controls-row [class*="span"] { float: left; } .controls-row .checkbox[class*="span"], .controls-row .radio[class*="span"] { padding-top: 5px; } input[disabled], select[disabled], textarea[disabled], input[readonly], select[readonly], textarea[readonly] { cursor: not-allowed; background-color: #eeeeee; } input[type="radio"][disabled], input[type="checkbox"][disabled], input[type="radio"][readonly], input[type="checkbox"][readonly] { background-color: transparent; } .control-group.warning .control-label, .control-group.warning .help-block, .control-group.warning .help-inline { color: #c09853; } .control-group.warning .checkbox, .control-group.warning .radio, .control-group.warning input, .control-group.warning select, .control-group.warning textarea { color: #c09853; } .control-group.warning input, .control-group.warning select, .control-group.warning textarea { border-color: #c09853; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); } .control-group.warning input:focus, .control-group.warning select:focus, .control-group.warning textarea:focus { border-color: #a47e3c; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; } .control-group.warning .input-prepend .add-on, .control-group.warning .input-append .add-on { color: #c09853; background-color: #fcf8e3; border-color: #c09853; } .control-group.error .control-label, .control-group.error .help-block, .control-group.error .help-inline { color: #b94a48; } .control-group.error .checkbox, .control-group.error .radio, .control-group.error input, .control-group.error select, .control-group.error textarea { color: #b94a48; } .control-group.error input, .control-group.error select, .control-group.error textarea { border-color: #b94a48; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); } .control-group.error input:focus, .control-group.error select:focus, .control-group.error textarea:focus { border-color: #953b39; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; } .control-group.error .input-prepend .add-on, .control-group.error .input-append .add-on { color: #b94a48; background-color: #f2dede; border-color: #b94a48; } .control-group.success .control-label, .control-group.success .help-block, .control-group.success .help-inline { color: #468847; } .control-group.success .checkbox, .control-group.success .radio, .control-group.success input, .control-group.success select, .control-group.success textarea { color: #468847; } .control-group.success input, .control-group.success select, .control-group.success textarea { border-color: #468847; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); } .control-group.success input:focus, .control-group.success select:focus, .control-group.success textarea:focus { border-color: #356635; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; } .control-group.success .input-prepend .add-on, .control-group.success .input-append .add-on { color: #468847; background-color: #dff0d8; border-color: #468847; } .control-group.info .control-label, .control-group.info .help-block, .control-group.info .help-inline { color: #3a87ad; } .control-group.info .checkbox, .control-group.info .radio, .control-group.info input, .control-group.info select, .control-group.info textarea { color: #3a87ad; } .control-group.info input, .control-group.info select, .control-group.info textarea { border-color: #3a87ad; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); } .control-group.info input:focus, .control-group.info select:focus, .control-group.info textarea:focus { border-color: #2d6987; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; } .control-group.info .input-prepend .add-on, .control-group.info .input-append .add-on { color: #3a87ad; background-color: #d9edf7; border-color: #3a87ad; } input:focus:invalid, textarea:focus:invalid, select:focus:invalid { color: #b94a48; border-color: #ee5f5b; } input:focus:invalid:focus, textarea:focus:invalid:focus, select:focus:invalid:focus { border-color: #e9322d; -webkit-box-shadow: 0 0 6px #f8b9b7; -moz-box-shadow: 0 0 6px #f8b9b7; box-shadow: 0 0 6px #f8b9b7; } .form-actions { padding: 19px 20px 20px; margin-top: 20px; margin-bottom: 20px; background-color: #f5f5f5; border-top: 1px solid #e5e5e5; *zoom: 1; } .form-actions:before, .form-actions:after { display: table; line-height: 0; content: ""; } .form-actions:after { clear: both; } .help-block, .help-inline { color: #595959; } .help-block { display: block; margin-bottom: 10px; } .help-inline { display: inline-block; *display: inline; padding-left: 5px; vertical-align: middle; *zoom: 1; } .input-append, .input-prepend { display: inline-block; margin-bottom: 10px; font-size: 0; white-space: nowrap; vertical-align: middle; } .input-append input, .input-prepend input, .input-append select, .input-prepend select, .input-append .uneditable-input, .input-prepend .uneditable-input, .input-append .dropdown-menu, .input-prepend .dropdown-menu, .input-append .popover, .input-prepend .popover { font-size: 14px; } .input-append input, .input-prepend input, .input-append select, .input-prepend select, .input-append .uneditable-input, .input-prepend .uneditable-input { position: relative; margin-bottom: 0; *margin-left: 0; vertical-align: top; -webkit-border-radius: 0 4px 4px 0; -moz-border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0; } .input-append input:focus, .input-prepend input:focus, .input-append select:focus, .input-prepend select:focus, .input-append .uneditable-input:focus, .input-prepend .uneditable-input:focus { z-index: 2; } .input-append .add-on, .input-prepend .add-on { display: inline-block; width: auto; height: 20px; min-width: 16px; padding: 4px 5px; font-size: 14px; font-weight: normal; line-height: 20px; text-align: center; text-shadow: 0 1px 0 #ffffff; background-color: #eeeeee; border: 1px solid #ccc; } .input-append .add-on, .input-prepend .add-on, .input-append .btn, .input-prepend .btn, .input-append .btn-group > .dropdown-toggle, .input-prepend .btn-group > .dropdown-toggle { vertical-align: top; -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0; } .input-append .active, .input-prepend .active { background-color: #a9dba9; border-color: #46a546; } .input-prepend .add-on, .input-prepend .btn { margin-right: -1px; } .input-prepend .add-on:first-child, .input-prepend .btn:first-child { -webkit-border-radius: 4px 0 0 4px; -moz-border-radius: 4px 0 0 4px; border-radius: 4px 0 0 4px; } .input-append input, .input-append select, .input-append .uneditable-input { -webkit-border-radius: 4px 0 0 4px; -moz-border-radius: 4px 0 0 4px; border-radius: 4px 0 0 4px; } .input-append input + .btn-group .btn:last-child, .input-append select + .btn-group .btn:last-child, .input-append .uneditable-input + .btn-group .btn:last-child { -webkit-border-radius: 0 4px 4px 0; -moz-border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0; } .input-append .add-on, .input-append .btn, .input-append .btn-group { margin-left: -1px; } .input-append .add-on:last-child, .input-append .btn:last-child, .input-append .btn-group:last-child > .dropdown-toggle { -webkit-border-radius: 0 4px 4px 0; -moz-border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0; } .input-prepend.input-append input, .input-prepend.input-append select, .input-prepend.input-append .uneditable-input { -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0; } .input-prepend.input-append input + .btn-group .btn, .input-prepend.input-append select + .btn-group .btn, .input-prepend.input-append .uneditable-input + .btn-group .btn { -webkit-border-radius: 0 4px 4px 0; -moz-border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0; } .input-prepend.input-append .add-on:first-child, .input-prepend.input-append .btn:first-child { margin-right: -1px; -webkit-border-radius: 4px 0 0 4px; -moz-border-radius: 4px 0 0 4px; border-radius: 4px 0 0 4px; } .input-prepend.input-append .add-on:last-child, .input-prepend.input-append .btn:last-child { margin-left: -1px; -webkit-border-radius: 0 4px 4px 0; -moz-border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0; } .input-prepend.input-append .btn-group:first-child { margin-left: 0; } input.search-query { padding-right: 14px; padding-right: 4px \9; padding-left: 14px; padding-left: 4px \9; /* IE7-8 doesn't have border-radius, so don't indent the padding */ margin-bottom: 0; -webkit-border-radius: 15px; -moz-border-radius: 15px; border-radius: 15px; } /* Allow for input prepend/append in search forms */ .form-search .input-append .search-query, .form-search .input-prepend .search-query { -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0; } .form-search .input-append .search-query { -webkit-border-radius: 14px 0 0 14px; -moz-border-radius: 14px 0 0 14px; border-radius: 14px 0 0 14px; } .form-search .input-append .btn { -webkit-border-radius: 0 14px 14px 0; -moz-border-radius: 0 14px 14px 0; border-radius: 0 14px 14px 0; } .form-search .input-prepend .search-query { -webkit-border-radius: 0 14px 14px 0; -moz-border-radius: 0 14px 14px 0; border-radius: 0 14px 14px 0; } .form-search .input-prepend .btn { -webkit-border-radius: 14px 0 0 14px; -moz-border-radius: 14px 0 0 14px; border-radius: 14px 0 0 14px; } .form-search input, .form-inline input, .form-horizontal input, .form-search textarea, .form-inline textarea, .form-horizontal textarea, .form-search select, .form-inline select, .form-horizontal select, .form-search .help-inline, .form-inline .help-inline, .form-horizontal .help-inline, .form-search .uneditable-input, .form-inline .uneditable-input, .form-horizontal .uneditable-input, .form-search .input-prepend, .form-inline .input-prepend, .form-horizontal .input-prepend, .form-search .input-append, .form-inline .input-append, .form-horizontal .input-append { display: inline-block; *display: inline; margin-bottom: 0; vertical-align: middle; *zoom: 1; } .form-search .hide, .form-inline .hide, .form-horizontal .hide { display: none; } .form-search label, .form-inline label, .form-search .btn-group, .form-inline .btn-group { display: inline-block; } .form-search .input-append, .form-inline .input-append, .form-search .input-prepend, .form-inline .input-prepend { margin-bottom: 0; } .form-search .radio, .form-search .checkbox, .form-inline .radio, .form-inline .checkbox { padding-left: 0; margin-bottom: 0; vertical-align: middle; } .form-search .radio input[type="radio"], .form-search .checkbox input[type="checkbox"], .form-inline .radio input[type="radio"], .form-inline .checkbox input[type="checkbox"] { float: left; margin-right: 3px; margin-left: 0; } .control-group { margin-bottom: 10px; } legend + .control-group { margin-top: 20px; -webkit-margin-top-collapse: separate; } .form-horizontal .control-group { margin-bottom: 20px; *zoom: 1; } .form-horizontal .control-group:before, .form-horizontal .control-group:after { display: table; line-height: 0; content: ""; } .form-horizontal .control-group:after { clear: both; } .form-horizontal .control-label { float: left; width: 160px; padding-top: 5px; text-align: right; } .form-horizontal .controls { *display: inline-block; *padding-left: 20px; margin-left: 180px; *margin-left: 0; } .form-horizontal .controls:first-child { *padding-left: 180px; } .form-horizontal .help-block { margin-bottom: 0; } .form-horizontal input + .help-block, .form-horizontal select + .help-block, .form-horizontal textarea + .help-block, .form-horizontal .uneditable-input + .help-block, .form-horizontal .input-prepend + .help-block, .form-horizontal .input-append + .help-block { margin-top: 10px; } .form-horizontal .form-actions { padding-left: 180px; } table { max-width: 100%; background-color: transparent; border-collapse: collapse; border-spacing: 0; } .table { width: 100%; margin-bottom: 20px; } .table th, .table td { padding: 8px; line-height: 20px; text-align: left; vertical-align: top; border-top: 1px solid #dddddd; } .table th { font-weight: bold; } .table thead th { vertical-align: bottom; } .table caption + thead tr:first-child th, .table caption + thead tr:first-child td, .table colgroup + thead tr:first-child th, .table colgroup + thead tr:first-child td, .table thead:first-child tr:first-child th, .table thead:first-child tr:first-child td { border-top: 0; } .table tbody + tbody { border-top: 2px solid #dddddd; } .table .table { background-color: #ffffff; } .table-condensed th, .table-condensed td { padding: 4px 5px; } .table-bordered { border: 1px solid #dddddd; border-collapse: separate; *border-collapse: collapse; border-left: 0; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } .table-bordered th, .table-bordered td { border-left: 1px solid #dddddd; } .table-bordered caption + thead tr:first-child th, .table-bordered caption + tbody tr:first-child th, .table-bordered caption + tbody tr:first-child td, .table-bordered colgroup + thead tr:first-child th, .table-bordered colgroup + tbody tr:first-child th, .table-bordered colgroup + tbody tr:first-child td, .table-bordered thead:first-child tr:first-child th, .table-bordered tbody:first-child tr:first-child th, .table-bordered tbody:first-child tr:first-child td { border-top: 0; } .table-bordered thead:first-child tr:first-child > th:first-child, .table-bordered tbody:first-child tr:first-child > td:first-child, .table-bordered tbody:first-child tr:first-child > th:first-child { -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topleft: 4px; } .table-bordered thead:first-child tr:first-child > th:last-child, .table-bordered tbody:first-child tr:first-child > td:last-child, .table-bordered tbody:first-child tr:first-child > th:last-child { -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-topright: 4px; } .table-bordered thead:last-child tr:last-child > th:first-child, .table-bordered tbody:last-child tr:last-child > td:first-child, .table-bordered tbody:last-child tr:last-child > th:first-child, .table-bordered tfoot:last-child tr:last-child > td:first-child, .table-bordered tfoot:last-child tr:last-child > th:first-child { -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomleft: 4px; } .table-bordered thead:last-child tr:last-child > th:last-child, .table-bordered tbody:last-child tr:last-child > td:last-child, .table-bordered tbody:last-child tr:last-child > th:last-child, .table-bordered tfoot:last-child tr:last-child > td:last-child, .table-bordered tfoot:last-child tr:last-child > th:last-child { -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; -moz-border-radius-bottomright: 4px; } .table-bordered tfoot + tbody:last-child tr:last-child td:first-child { -webkit-border-bottom-left-radius: 0; border-bottom-left-radius: 0; -moz-border-radius-bottomleft: 0; } .table-bordered tfoot + tbody:last-child tr:last-child td:last-child { -webkit-border-bottom-right-radius: 0; border-bottom-right-radius: 0; -moz-border-radius-bottomright: 0; } .table-bordered caption + thead tr:first-child th:first-child, .table-bordered caption + tbody tr:first-child td:first-child, .table-bordered colgroup + thead tr:first-child th:first-child, .table-bordered colgroup + tbody tr:first-child td:first-child { -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topleft: 4px; } .table-bordered caption + thead tr:first-child th:last-child, .table-bordered caption + tbody tr:first-child td:last-child, .table-bordered colgroup + thead tr:first-child th:last-child, .table-bordered colgroup + tbody tr:first-child td:last-child { -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-topright: 4px; } .table-striped tbody > tr:nth-child(odd) > td, .table-striped tbody > tr:nth-child(odd) > th { background-color: #f9f9f9; } .table-hover tbody tr:hover > td, .table-hover tbody tr:hover > th { background-color: #f5f5f5; } table td[class*="span"], table th[class*="span"], .row-fluid table td[class*="span"], .row-fluid table th[class*="span"] { display: table-cell; float: none; margin-left: 0; } .table td.span1, .table th.span1 { float: none; width: 44px; margin-left: 0; } .table td.span2, .table th.span2 { float: none; width: 124px; margin-left: 0; } .table td.span3, .table th.span3 { float: none; width: 204px; margin-left: 0; } .table td.span4, .table th.span4 { float: none; width: 284px; margin-left: 0; } .table td.span5, .table th.span5 { float: none; width: 364px; margin-left: 0; } .table td.span6, .table th.span6 { float: none; width: 444px; margin-left: 0; } .table td.span7, .table th.span7 { float: none; width: 524px; margin-left: 0; } .table td.span8, .table th.span8 { float: none; width: 604px; margin-left: 0; } .table td.span9, .table th.span9 { float: none; width: 684px; margin-left: 0; } .table td.span10, .table th.span10 { float: none; width: 764px; margin-left: 0; } .table td.span11, .table th.span11 { float: none; width: 844px; margin-left: 0; } .table td.span12, .table th.span12 { float: none; width: 924px; margin-left: 0; } .table tbody tr.success > td { background-color: #dff0d8; } .table tbody tr.error > td { background-color: #f2dede; } .table tbody tr.warning > td { background-color: #fcf8e3; } .table tbody tr.info > td { background-color: #d9edf7; } .table-hover tbody tr.success:hover > td { background-color: #d0e9c6; } .table-hover tbody tr.error:hover > td { background-color: #ebcccc; } .table-hover tbody tr.warning:hover > td { background-color: #faf2cc; } .table-hover tbody tr.info:hover > td { background-color: #c4e3f3; } [class^="icon-"], [class*=" icon-"] { display: inline-block; width: 14px; height: 14px; margin-top: 1px; *margin-right: .3em; line-height: 14px; vertical-align: text-top; background-image: url("../../img/glyphicons-halflings.png"); background-position: 14px 14px; background-repeat: no-repeat; } /* White icons with optional class, or on hover/focus/active states of certain elements */ .icon-white, .nav-pills > .active > a > [class^="icon-"], .nav-pills > .active > a > [class*=" icon-"], .nav-list > .active > a > [class^="icon-"], .nav-list > .active > a > [class*=" icon-"], .navbar-inverse .nav > .active > a > [class^="icon-"], .navbar-inverse .nav > .active > a > [class*=" icon-"], .dropdown-menu > li > a:hover > [class^="icon-"], .dropdown-menu > li > a:focus > [class^="icon-"], .dropdown-menu > li > a:hover > [class*=" icon-"], .dropdown-menu > li > a:focus > [class*=" icon-"], .dropdown-menu > .active > a > [class^="icon-"], .dropdown-menu > .active > a > [class*=" icon-"], .dropdown-submenu:hover > a > [class^="icon-"], .dropdown-submenu:focus > a > [class^="icon-"], .dropdown-submenu:hover > a > [class*=" icon-"], .dropdown-submenu:focus > a > [class*=" icon-"] { background-image: url("../../img/glyphicons-halflings-white.png"); } .icon-glass { background-position: 0 0; } .icon-music { background-position: -24px 0; } .icon-search { background-position: -48px 0; } .icon-envelope { background-position: -72px 0; } .icon-heart { background-position: -96px 0; } .icon-star { background-position: -120px 0; } .icon-star-empty { background-position: -144px 0; } .icon-user { background-position: -168px 0; } .icon-film { background-position: -192px 0; } .icon-th-large { background-position: -216px 0; } .icon-th { background-position: -240px 0; } .icon-th-list { background-position: -264px 0; } .icon-ok { background-position: -288px 0; } .icon-remove { background-position: -312px 0; } .icon-zoom-in { background-position: -336px 0; } .icon-zoom-out { background-position: -360px 0; } .icon-off { background-position: -384px 0; } .icon-signal { background-position: -408px 0; } .icon-cog { background-position: -432px 0; } .icon-trash { background-position: -456px 0; } .icon-home { background-position: 0 -24px; } .icon-file { background-position: -24px -24px; } .icon-time { background-position: -48px -24px; } .icon-road { background-position: -72px -24px; } .icon-download-alt { background-position: -96px -24px; } .icon-download { background-position: -120px -24px; } .icon-upload { background-position: -144px -24px; } .icon-inbox { background-position: -168px -24px; } .icon-play-circle { background-position: -192px -24px; } .icon-repeat { background-position: -216px -24px; } .icon-refresh { background-position: -240px -24px; } .icon-list-alt { background-position: -264px -24px; } .icon-lock { background-position: -287px -24px; } .icon-flag { background-position: -312px -24px; } .icon-headphones { background-position: -336px -24px; } .icon-volume-off { background-position: -360px -24px; } .icon-volume-down { background-position: -384px -24px; } .icon-volume-up { background-position: -408px -24px; } .icon-qrcode { background-position: -432px -24px; } .icon-barcode { background-position: -456px -24px; } .icon-tag { background-position: 0 -48px; } .icon-tags { background-position: -25px -48px; } .icon-book { background-position: -48px -48px; } .icon-bookmark { background-position: -72px -48px; } .icon-print { background-position: -96px -48px; } .icon-camera { background-position: -120px -48px; } .icon-font { background-position: -144px -48px; } .icon-bold { background-position: -167px -48px; } .icon-italic { background-position: -192px -48px; } .icon-text-height { background-position: -216px -48px; } .icon-text-width { background-position: -240px -48px; } .icon-align-left { background-position: -264px -48px; } .icon-align-center { background-position: -288px -48px; } .icon-align-right { background-position: -312px -48px; } .icon-align-justify { background-position: -336px -48px; } .icon-list { background-position: -360px -48px; } .icon-indent-left { background-position: -384px -48px; } .icon-indent-right { background-position: -408px -48px; } .icon-facetime-video { background-position: -432px -48px; } .icon-picture { background-position: -456px -48px; } .icon-pencil { background-position: 0 -72px; } .icon-map-marker { background-position: -24px -72px; } .icon-adjust { background-position: -48px -72px; } .icon-tint { background-position: -72px -72px; } .icon-edit { background-position: -96px -72px; } .icon-share { background-position: -120px -72px; } .icon-check { background-position: -144px -72px; } .icon-move { background-position: -168px -72px; } .icon-step-backward { background-position: -192px -72px; } .icon-fast-backward { background-position: -216px -72px; } .icon-backward { background-position: -240px -72px; } .icon-play { background-position: -264px -72px; } .icon-pause { background-position: -288px -72px; } .icon-stop { background-position: -312px -72px; } .icon-forward { background-position: -336px -72px; } .icon-fast-forward { background-position: -360px -72px; } .icon-step-forward { background-position: -384px -72px; } .icon-eject { background-position: -408px -72px; } .icon-chevron-left { background-position: -432px -72px; } .icon-chevron-right { background-position: -456px -72px; } .icon-plus-sign { background-position: 0 -96px; } .icon-minus-sign { background-position: -24px -96px; } .icon-remove-sign { background-position: -48px -96px; } .icon-ok-sign { background-position: -72px -96px; } .icon-question-sign { background-position: -96px -96px; } .icon-info-sign { background-position: -120px -96px; } .icon-screenshot { background-position: -144px -96px; } .icon-remove-circle { background-position: -168px -96px; } .icon-ok-circle { background-position: -192px -96px; } .icon-ban-circle { background-position: -216px -96px; } .icon-arrow-left { background-position: -240px -96px; } .icon-arrow-right { background-position: -264px -96px; } .icon-arrow-up { background-position: -289px -96px; } .icon-arrow-down { background-position: -312px -96px; } .icon-share-alt { background-position: -336px -96px; } .icon-resize-full { background-position: -360px -96px; } .icon-resize-small { background-position: -384px -96px; } .icon-plus { background-position: -408px -96px; } .icon-minus { background-position: -433px -96px; } .icon-asterisk { background-position: -456px -96px; } .icon-exclamation-sign { background-position: 0 -120px; } .icon-gift { background-position: -24px -120px; } .icon-leaf { background-position: -48px -120px; } .icon-fire { background-position: -72px -120px; } .icon-eye-open { background-position: -96px -120px; } .icon-eye-close { background-position: -120px -120px; } .icon-warning-sign { background-position: -144px -120px; } .icon-plane { background-position: -168px -120px; } .icon-calendar { background-position: -192px -120px; } .icon-random { width: 16px; background-position: -216px -120px; } .icon-comment { background-position: -240px -120px; } .icon-magnet { background-position: -264px -120px; } .icon-chevron-up { background-position: -288px -120px; } .icon-chevron-down { background-position: -313px -119px; } .icon-retweet { background-position: -336px -120px; } .icon-shopping-cart { background-position: -360px -120px; } .icon-folder-close { width: 16px; background-position: -384px -120px; } .icon-folder-open { width: 16px; background-position: -408px -120px; } .icon-resize-vertical { background-position: -432px -119px; } .icon-resize-horizontal { background-position: -456px -118px; } .icon-hdd { background-position: 0 -144px; } .icon-bullhorn { background-position: -24px -144px; } .icon-bell { background-position: -48px -144px; } .icon-certificate { background-position: -72px -144px; } .icon-thumbs-up { background-position: -96px -144px; } .icon-thumbs-down { background-position: -120px -144px; } .icon-hand-right { background-position: -144px -144px; } .icon-hand-left { background-position: -168px -144px; } .icon-hand-up { background-position: -192px -144px; } .icon-hand-down { background-position: -216px -144px; } .icon-circle-arrow-right { background-position: -240px -144px; } .icon-circle-arrow-left { background-position: -264px -144px; } .icon-circle-arrow-up { background-position: -288px -144px; } .icon-circle-arrow-down { background-position: -312px -144px; } .icon-globe { background-position: -336px -144px; } .icon-wrench { background-position: -360px -144px; } .icon-tasks { background-position: -384px -144px; } .icon-filter { background-position: -408px -144px; } .icon-briefcase { background-position: -432px -144px; } .icon-fullscreen { background-position: -456px -144px; } .dropup, .dropdown { position: relative; } .dropdown-toggle { *margin-bottom: -3px; } .dropdown-toggle:active, .open .dropdown-toggle { outline: 0; } .caret { display: inline-block; width: 0; height: 0; vertical-align: top; border-top: 4px solid #000000; border-right: 4px solid transparent; border-left: 4px solid transparent; content: ""; } .dropdown .caret { margin-top: 8px; margin-left: 2px; } .dropdown-menu { position: absolute; top: 100%; left: 0; z-index: 1000; display: none; float: left; min-width: 160px; padding: 5px 0; margin: 2px 0 0; list-style: none; background-color: #ffffff; border: 1px solid #ccc; border: 1px solid rgba(0, 0, 0, 0.2); *border-right-width: 2px; *border-bottom-width: 2px; -webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px; -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); -webkit-background-clip: padding-box; -moz-background-clip: padding; background-clip: padding-box; } .dropdown-menu.pull-right { right: 0; left: auto; } .dropdown-menu .divider { *width: 100%; height: 1px; margin: 9px 1px; *margin: -5px 0 5px; overflow: hidden; background-color: #e5e5e5; border-bottom: 1px solid #ffffff; } .dropdown-menu > li > a { display: block; padding: 3px 20px; clear: both; font-weight: normal; line-height: 20px; color: #333333; white-space: nowrap; } .dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus, .dropdown-submenu:hover > a, .dropdown-submenu:focus > a { color: #ffffff; text-decoration: none; background-color: #0081c2; background-image: -moz-linear-gradient(top, #0088cc, #0077b3); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); background-image: -o-linear-gradient(top, #0088cc, #0077b3); background-image: linear-gradient(to bottom, #0088cc, #0077b3); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); } .dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus { color: #ffffff; text-decoration: none; background-color: #0081c2; background-image: -moz-linear-gradient(top, #0088cc, #0077b3); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); background-image: -o-linear-gradient(top, #0088cc, #0077b3); background-image: linear-gradient(to bottom, #0088cc, #0077b3); background-repeat: repeat-x; outline: 0; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); } .dropdown-menu > .disabled > a, .dropdown-menu > .disabled > a:hover, .dropdown-menu > .disabled > a:focus { color: #999999; } .dropdown-menu > .disabled > a:hover, .dropdown-menu > .disabled > a:focus { text-decoration: none; cursor: default; background-color: transparent; background-image: none; filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); } .open { *z-index: 1000; } .open > .dropdown-menu { display: block; } .dropdown-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 990; } .pull-right > .dropdown-menu { right: 0; left: auto; } .dropup .caret, .navbar-fixed-bottom .dropdown .caret { border-top: 0; border-bottom: 4px solid #000000; content: ""; } .dropup .dropdown-menu, .navbar-fixed-bottom .dropdown .dropdown-menu { top: auto; bottom: 100%; margin-bottom: 1px; } .dropdown-submenu { position: relative; } .dropdown-submenu > .dropdown-menu { top: 0; left: 100%; margin-top: -6px; margin-left: -1px; -webkit-border-radius: 0 6px 6px 6px; -moz-border-radius: 0 6px 6px 6px; border-radius: 0 6px 6px 6px; } .dropdown-submenu:hover > .dropdown-menu { display: block; } .dropup .dropdown-submenu > .dropdown-menu { top: auto; bottom: 0; margin-top: 0; margin-bottom: -2px; -webkit-border-radius: 5px 5px 5px 0; -moz-border-radius: 5px 5px 5px 0; border-radius: 5px 5px 5px 0; } .dropdown-submenu > a:after { display: block; float: right; width: 0; height: 0; margin-top: 5px; margin-right: -10px; border-color: transparent; border-left-color: #cccccc; border-style: solid; border-width: 5px 0 5px 5px; content: " "; } .dropdown-submenu:hover > a:after { border-left-color: #ffffff; } .dropdown-submenu.pull-left { float: none; } .dropdown-submenu.pull-left > .dropdown-menu { left: -100%; margin-left: 10px; -webkit-border-radius: 6px 0 6px 6px; -moz-border-radius: 6px 0 6px 6px; border-radius: 6px 0 6px 6px; } .dropdown .dropdown-menu .nav-header { padding-right: 20px; padding-left: 20px; } .typeahead { z-index: 1051; margin-top: 2px; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } .well { min-height: 20px; padding: 19px; margin-bottom: 20px; background-color: #f5f5f5; border: 1px solid #e3e3e3; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); } .well blockquote { border-color: #ddd; border-color: rgba(0, 0, 0, 0.15); } .well-large { padding: 24px; -webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px; } .well-small { padding: 9px; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; } .fade { opacity: 0; -webkit-transition: opacity 0.15s linear; -moz-transition: opacity 0.15s linear; -o-transition: opacity 0.15s linear; transition: opacity 0.15s linear; } .fade.in { opacity: 1; } .collapse { position: relative; height: 0; overflow: hidden; -webkit-transition: height 0.35s ease; -moz-transition: height 0.35s ease; -o-transition: height 0.35s ease; transition: height 0.35s ease; } .collapse.in { height: auto; } .close { float: right; font-size: 20px; font-weight: bold; line-height: 20px; color: #000000; text-shadow: 0 1px 0 #ffffff; opacity: 0.2; filter: alpha(opacity=20); } .close:hover, .close:focus { color: #000000; text-decoration: none; cursor: pointer; opacity: 0.4; filter: alpha(opacity=40); } button.close { padding: 0; cursor: pointer; background: transparent; border: 0; -webkit-appearance: none; } .btn { display: inline-block; *display: inline; padding: 4px 12px; margin-bottom: 0; *margin-left: .3em; font-size: 14px; line-height: 20px; color: #333333; text-align: center; text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); vertical-align: middle; cursor: pointer; background-color: #f5f5f5; *background-color: #e6e6e6; background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); background-repeat: repeat-x; border: 1px solid #cccccc; *border: 0; border-color: #e6e6e6 #e6e6e6 #bfbfbf; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); border-bottom-color: #b3b3b3; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); *zoom: 1; -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); } .btn:hover, .btn:focus, .btn:active, .btn.active, .btn.disabled, .btn[disabled] { color: #333333; background-color: #e6e6e6; *background-color: #d9d9d9; } .btn:active, .btn.active { background-color: #cccccc \9; } .btn:first-child { *margin-left: 0; } .btn:hover, .btn:focus { color: #333333; text-decoration: none; background-position: 0 -15px; -webkit-transition: background-position 0.1s linear; -moz-transition: background-position 0.1s linear; -o-transition: background-position 0.1s linear; transition: background-position 0.1s linear; } .btn:focus { outline: thin dotted #333; outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px; } .btn.active, .btn:active { background-image: none; outline: 0; -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); } .btn.disabled, .btn[disabled] { cursor: default; background-image: none; opacity: 0.65; filter: alpha(opacity=65); -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; } .btn-large { padding: 11px 19px; font-size: 17.5px; -webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px; } .btn-large [class^="icon-"], .btn-large [class*=" icon-"] { margin-top: 4px; } .btn-small { padding: 2px 10px; font-size: 11.9px; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; } .btn-small [class^="icon-"], .btn-small [class*=" icon-"] { margin-top: 0; } .btn-mini [class^="icon-"], .btn-mini [class*=" icon-"] { margin-top: -1px; } .btn-mini { padding: 0 6px; font-size: 10.5px; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; } .btn-block { display: block; width: 100%; padding-right: 0; padding-left: 0; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } .btn-block + .btn-block { margin-top: 5px; } input[type="submit"].btn-block, input[type="reset"].btn-block, input[type="button"].btn-block { width: 100%; } .btn-primary.active, .btn-warning.active, .btn-danger.active, .btn-success.active, .btn-info.active, .btn-inverse.active { color: rgba(255, 255, 255, 0.75); } .btn-primary { color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #006dcc; *background-color: #0044cc; background-image: -moz-linear-gradient(top, #0088cc, #0044cc); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); background-image: -o-linear-gradient(top, #0088cc, #0044cc); background-image: linear-gradient(to bottom, #0088cc, #0044cc); background-repeat: repeat-x; border-color: #0044cc #0044cc #002a80; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); } .btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active, .btn-primary.disabled, .btn-primary[disabled] { color: #ffffff; background-color: #0044cc; *background-color: #003bb3; } .btn-primary:active, .btn-primary.active { background-color: #003399 \9; } .btn-warning { color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #faa732; *background-color: #f89406; background-image: -moz-linear-gradient(top, #fbb450, #f89406); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); background-image: -webkit-linear-gradient(top, #fbb450, #f89406); background-image: -o-linear-gradient(top, #fbb450, #f89406); background-image: linear-gradient(to bottom, #fbb450, #f89406); background-repeat: repeat-x; border-color: #f89406 #f89406 #ad6704; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); } .btn-warning:hover, .btn-warning:focus, .btn-warning:active, .btn-warning.active, .btn-warning.disabled, .btn-warning[disabled] { color: #ffffff; background-color: #f89406; *background-color: #df8505; } .btn-warning:active, .btn-warning.active { background-color: #c67605 \9; } .btn-danger { color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #da4f49; *background-color: #bd362f; background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f)); background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f); background-image: -o-linear-gradient(top, #ee5f5b, #bd362f); background-image: linear-gradient(to bottom, #ee5f5b, #bd362f); background-repeat: repeat-x; border-color: #bd362f #bd362f #802420; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); } .btn-danger:hover, .btn-danger:focus, .btn-danger:active, .btn-danger.active, .btn-danger.disabled, .btn-danger[disabled] { color: #ffffff; background-color: #bd362f; *background-color: #a9302a; } .btn-danger:active, .btn-danger.active { background-color: #942a25 \9; } .btn-success { color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #5bb75b; *background-color: #51a351; background-image: -moz-linear-gradient(top, #62c462, #51a351); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351)); background-image: -webkit-linear-gradient(top, #62c462, #51a351); background-image: -o-linear-gradient(top, #62c462, #51a351); background-image: linear-gradient(to bottom, #62c462, #51a351); background-repeat: repeat-x; border-color: #51a351 #51a351 #387038; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); } .btn-success:hover, .btn-success:focus, .btn-success:active, .btn-success.active, .btn-success.disabled, .btn-success[disabled] { color: #ffffff; background-color: #51a351; *background-color: #499249; } .btn-success:active, .btn-success.active { background-color: #408140 \9; } .btn-info { color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #49afcd; *background-color: #2f96b4; background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4)); background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4); background-image: -o-linear-gradient(top, #5bc0de, #2f96b4); background-image: linear-gradient(to bottom, #5bc0de, #2f96b4); background-repeat: repeat-x; border-color: #2f96b4 #2f96b4 #1f6377; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); } .btn-info:hover, .btn-info:focus, .btn-info:active, .btn-info.active, .btn-info.disabled, .btn-info[disabled] { color: #ffffff; background-color: #2f96b4; *background-color: #2a85a0; } .btn-info:active, .btn-info.active { background-color: #24748c \9; } .btn-inverse { color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #363636; *background-color: #222222; background-image: -moz-linear-gradient(top, #444444, #222222); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222)); background-image: -webkit-linear-gradient(top, #444444, #222222); background-image: -o-linear-gradient(top, #444444, #222222); background-image: linear-gradient(to bottom, #444444, #222222); background-repeat: repeat-x; border-color: #222222 #222222 #000000; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); } .btn-inverse:hover, .btn-inverse:focus, .btn-inverse:active, .btn-inverse.active, .btn-inverse.disabled, .btn-inverse[disabled] { color: #ffffff; background-color: #222222; *background-color: #151515; } .btn-inverse:active, .btn-inverse.active { background-color: #080808 \9; } button.btn, input[type="submit"].btn { *padding-top: 3px; *padding-bottom: 3px; } button.btn::-moz-focus-inner, input[type="submit"].btn::-moz-focus-inner { padding: 0; border: 0; } button.btn.btn-large, input[type="submit"].btn.btn-large { *padding-top: 7px; *padding-bottom: 7px; } button.btn.btn-small, input[type="submit"].btn.btn-small { *padding-top: 3px; *padding-bottom: 3px; } button.btn.btn-mini, input[type="submit"].btn.btn-mini { *padding-top: 1px; *padding-bottom: 1px; } .btn-link, .btn-link:active, .btn-link[disabled] { background-color: transparent; background-image: none; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; } .btn-link { color: #0088cc; cursor: pointer; border-color: transparent; -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0; } .btn-link:hover, .btn-link:focus { color: #005580; text-decoration: underline; background-color: transparent; } .btn-link[disabled]:hover, .btn-link[disabled]:focus { color: #333333; text-decoration: none; } .btn-group { position: relative; display: inline-block; *display: inline; *margin-left: .3em; font-size: 0; white-space: nowrap; vertical-align: middle; *zoom: 1; } .btn-group:first-child { *margin-left: 0; } .btn-group + .btn-group { margin-left: 5px; } .btn-toolbar { margin-top: 10px; margin-bottom: 10px; font-size: 0; } .btn-toolbar > .btn + .btn, .btn-toolbar > .btn-group + .btn, .btn-toolbar > .btn + .btn-group { margin-left: 5px; } .btn-group > .btn { position: relative; -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0; } .btn-group > .btn + .btn { margin-left: -1px; } .btn-group > .btn, .btn-group > .dropdown-menu, .btn-group > .popover { font-size: 14px; } .btn-group > .btn-mini { font-size: 10.5px; } .btn-group > .btn-small { font-size: 11.9px; } .btn-group > .btn-large { font-size: 17.5px; } .btn-group > .btn:first-child { margin-left: 0; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-topleft: 4px; } .btn-group > .btn:last-child, .btn-group > .dropdown-toggle { -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; -moz-border-radius-topright: 4px; -moz-border-radius-bottomright: 4px; } .btn-group > .btn.large:first-child { margin-left: 0; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; -moz-border-radius-bottomleft: 6px; -moz-border-radius-topleft: 6px; } .btn-group > .btn.large:last-child, .btn-group > .large.dropdown-toggle { -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; -moz-border-radius-topright: 6px; -moz-border-radius-bottomright: 6px; } .btn-group > .btn:hover, .btn-group > .btn:focus, .btn-group > .btn:active, .btn-group > .btn.active { z-index: 2; } .btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle { outline: 0; } .btn-group > .btn + .dropdown-toggle { *padding-top: 5px; padding-right: 8px; *padding-bottom: 5px; padding-left: 8px; -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); -moz-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); } .btn-group > .btn-mini + .dropdown-toggle { *padding-top: 2px; padding-right: 5px; *padding-bottom: 2px; padding-left: 5px; } .btn-group > .btn-small + .dropdown-toggle { *padding-top: 5px; *padding-bottom: 4px; } .btn-group > .btn-large + .dropdown-toggle { *padding-top: 7px; padding-right: 12px; *padding-bottom: 7px; padding-left: 12px; } .btn-group.open .dropdown-toggle { background-image: none; -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); } .btn-group.open .btn.dropdown-toggle { background-color: #e6e6e6; } .btn-group.open .btn-primary.dropdown-toggle { background-color: #0044cc; } .btn-group.open .btn-warning.dropdown-toggle { background-color: #f89406; } .btn-group.open .btn-danger.dropdown-toggle { background-color: #bd362f; } .btn-group.open .btn-success.dropdown-toggle { background-color: #51a351; } .btn-group.open .btn-info.dropdown-toggle { background-color: #2f96b4; } .btn-group.open .btn-inverse.dropdown-toggle { background-color: #222222; } .btn .caret { margin-top: 8px; margin-left: 0; } .btn-large .caret { margin-top: 6px; } .btn-large .caret { border-top-width: 5px; border-right-width: 5px; border-left-width: 5px; } .btn-mini .caret, .btn-small .caret { margin-top: 8px; } .dropup .btn-large .caret { border-bottom-width: 5px; } .btn-primary .caret, .btn-warning .caret, .btn-danger .caret, .btn-info .caret, .btn-success .caret, .btn-inverse .caret { border-top-color: #ffffff; border-bottom-color: #ffffff; } .btn-group-vertical { display: inline-block; *display: inline; /* IE7 inline-block hack */ *zoom: 1; } .btn-group-vertical > .btn { display: block; float: none; max-width: 100%; -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0; } .btn-group-vertical > .btn + .btn { margin-top: -1px; margin-left: 0; } .btn-group-vertical > .btn:first-child { -webkit-border-radius: 4px 4px 0 0; -moz-border-radius: 4px 4px 0 0; border-radius: 4px 4px 0 0; } .btn-group-vertical > .btn:last-child { -webkit-border-radius: 0 0 4px 4px; -moz-border-radius: 0 0 4px 4px; border-radius: 0 0 4px 4px; } .btn-group-vertical > .btn-large:first-child { -webkit-border-radius: 6px 6px 0 0; -moz-border-radius: 6px 6px 0 0; border-radius: 6px 6px 0 0; } .btn-group-vertical > .btn-large:last-child { -webkit-border-radius: 0 0 6px 6px; -moz-border-radius: 0 0 6px 6px; border-radius: 0 0 6px 6px; } .alert { padding: 8px 35px 8px 14px; margin-bottom: 20px; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); background-color: #fcf8e3; border: 1px solid #fbeed5; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } .alert, .alert h4 { color: #c09853; } .alert h4 { margin: 0; } .alert .close { position: relative; top: -2px; right: -21px; line-height: 20px; } .alert-success { color: #468847; background-color: #dff0d8; border-color: #d6e9c6; } .alert-success h4 { color: #468847; } .alert-danger, .alert-error { color: #b94a48; background-color: #f2dede; border-color: #eed3d7; } .alert-danger h4, .alert-error h4 { color: #b94a48; } .alert-info { color: #3a87ad; background-color: #d9edf7; border-color: #bce8f1; } .alert-info h4 { color: #3a87ad; } .alert-block { padding-top: 14px; padding-bottom: 14px; } .alert-block > p, .alert-block > ul { margin-bottom: 0; } .alert-block p + p { margin-top: 5px; } .nav { margin-bottom: 20px; margin-left: 0; list-style: none; } .nav > li > a { display: block; } .nav > li > a:hover, .nav > li > a:focus { text-decoration: none; background-color: #eeeeee; } .nav > li > a > img { max-width: none; } .nav > .pull-right { float: right; } .nav-header { display: block; padding: 3px 15px; font-size: 11px; font-weight: bold; line-height: 20px; color: #999999; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); text-transform: uppercase; } .nav li + .nav-header { margin-top: 9px; } .nav-list { padding-right: 15px; padding-left: 15px; margin-bottom: 0; } .nav-list > li > a, .nav-list .nav-header { margin-right: -15px; margin-left: -15px; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); } .nav-list > li > a { padding: 3px 15px; } .nav-list > .active > a, .nav-list > .active > a:hover, .nav-list > .active > a:focus { color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); background-color: #0088cc; } .nav-list [class^="icon-"], .nav-list [class*=" icon-"] { margin-right: 2px; } .nav-list .divider { *width: 100%; height: 1px; margin: 9px 1px; *margin: -5px 0 5px; overflow: hidden; background-color: #e5e5e5; border-bottom: 1px solid #ffffff; } .nav-tabs, .nav-pills { *zoom: 1; } .nav-tabs:before, .nav-pills:before, .nav-tabs:after, .nav-pills:after { display: table; line-height: 0; content: ""; } .nav-tabs:after, .nav-pills:after { clear: both; } .nav-tabs > li, .nav-pills > li { float: left; } .nav-tabs > li > a, .nav-pills > li > a { padding-right: 12px; padding-left: 12px; margin-right: 2px; line-height: 14px; } .nav-tabs { border-bottom: 1px solid #ddd; } .nav-tabs > li { margin-bottom: -1px; } .nav-tabs > li > a { padding-top: 8px; padding-bottom: 8px; line-height: 20px; border: 1px solid transparent; -webkit-border-radius: 4px 4px 0 0; -moz-border-radius: 4px 4px 0 0; border-radius: 4px 4px 0 0; } .nav-tabs > li > a:hover, .nav-tabs > li > a:focus { border-color: #eeeeee #eeeeee #dddddd; } .nav-tabs > .active > a, .nav-tabs > .active > a:hover, .nav-tabs > .active > a:focus { color: #555555; cursor: default; background-color: #ffffff; border: 1px solid #ddd; border-bottom-color: transparent; } .nav-pills > li > a { padding-top: 8px; padding-bottom: 8px; margin-top: 2px; margin-bottom: 2px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; } .nav-pills > .active > a, .nav-pills > .active > a:hover, .nav-pills > .active > a:focus { color: #ffffff; background-color: #0088cc; } .nav-stacked > li { float: none; } .nav-stacked > li > a { margin-right: 0; } .nav-tabs.nav-stacked { border-bottom: 0; } .nav-tabs.nav-stacked > li > a { border: 1px solid #ddd; -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0; } .nav-tabs.nav-stacked > li:first-child > a { -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -moz-border-radius-topleft: 4px; } .nav-tabs.nav-stacked > li:last-child > a { -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -moz-border-radius-bottomleft: 4px; } .nav-tabs.nav-stacked > li > a:hover, .nav-tabs.nav-stacked > li > a:focus { z-index: 2; border-color: #ddd; } .nav-pills.nav-stacked > li > a { margin-bottom: 3px; } .nav-pills.nav-stacked > li:last-child > a { margin-bottom: 1px; } .nav-tabs .dropdown-menu { -webkit-border-radius: 0 0 6px 6px; -moz-border-radius: 0 0 6px 6px; border-radius: 0 0 6px 6px; } .nav-pills .dropdown-menu { -webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px; } .nav .dropdown-toggle .caret { margin-top: 6px; border-top-color: #0088cc; border-bottom-color: #0088cc; } .nav .dropdown-toggle:hover .caret, .nav .dropdown-toggle:focus .caret { border-top-color: #005580; border-bottom-color: #005580; } /* move down carets for tabs */ .nav-tabs .dropdown-toggle .caret { margin-top: 8px; } .nav .active .dropdown-toggle .caret { border-top-color: #fff; border-bottom-color: #fff; } .nav-tabs .active .dropdown-toggle .caret { border-top-color: #555555; border-bottom-color: #555555; } .nav > .dropdown.active > a:hover, .nav > .dropdown.active > a:focus { cursor: pointer; } .nav-tabs .open .dropdown-toggle, .nav-pills .open .dropdown-toggle, .nav > li.dropdown.open.active > a:hover, .nav > li.dropdown.open.active > a:focus { color: #ffffff; background-color: #999999; border-color: #999999; } .nav li.dropdown.open .caret, .nav li.dropdown.open.active .caret, .nav li.dropdown.open a:hover .caret, .nav li.dropdown.open a:focus .caret { border-top-color: #ffffff; border-bottom-color: #ffffff; opacity: 1; filter: alpha(opacity=100); } .tabs-stacked .open > a:hover, .tabs-stacked .open > a:focus { border-color: #999999; } .tabbable { *zoom: 1; } .tabbable:before, .tabbable:after { display: table; line-height: 0; content: ""; } .tabbable:after { clear: both; } .tab-content { overflow: auto; } .tabs-below > .nav-tabs, .tabs-right > .nav-tabs, .tabs-left > .nav-tabs { border-bottom: 0; } .tab-content > .tab-pane, .pill-content > .pill-pane { display: none; } .tab-content > .active, .pill-content > .active { display: block; } .tabs-below > .nav-tabs { border-top: 1px solid #ddd; } .tabs-below > .nav-tabs > li { margin-top: -1px; margin-bottom: 0; } .tabs-below > .nav-tabs > li > a { -webkit-border-radius: 0 0 4px 4px; -moz-border-radius: 0 0 4px 4px; border-radius: 0 0 4px 4px; } .tabs-below > .nav-tabs > li > a:hover, .tabs-below > .nav-tabs > li > a:focus { border-top-color: #ddd; border-bottom-color: transparent; } .tabs-below > .nav-tabs > .active > a, .tabs-below > .nav-tabs > .active > a:hover, .tabs-below > .nav-tabs > .active > a:focus { border-color: transparent #ddd #ddd #ddd; } .tabs-left > .nav-tabs > li, .tabs-right > .nav-tabs > li { float: none; } .tabs-left > .nav-tabs > li > a, .tabs-right > .nav-tabs > li > a { min-width: 74px; margin-right: 0; margin-bottom: 3px; } .tabs-left > .nav-tabs { float: left; margin-right: 19px; border-right: 1px solid #ddd; } .tabs-left > .nav-tabs > li > a { margin-right: -1px; -webkit-border-radius: 4px 0 0 4px; -moz-border-radius: 4px 0 0 4px; border-radius: 4px 0 0 4px; } .tabs-left > .nav-tabs > li > a:hover, .tabs-left > .nav-tabs > li > a:focus { border-color: #eeeeee #dddddd #eeeeee #eeeeee; } .tabs-left > .nav-tabs .active > a, .tabs-left > .nav-tabs .active > a:hover, .tabs-left > .nav-tabs .active > a:focus { border-color: #ddd transparent #ddd #ddd; *border-right-color: #ffffff; } .tabs-right > .nav-tabs { float: right; margin-left: 19px; border-left: 1px solid #ddd; } .tabs-right > .nav-tabs > li > a { margin-left: -1px; -webkit-border-radius: 0 4px 4px 0; -moz-border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0; } .tabs-right > .nav-tabs > li > a:hover, .tabs-right > .nav-tabs > li > a:focus { border-color: #eeeeee #eeeeee #eeeeee #dddddd; } .tabs-right > .nav-tabs .active > a, .tabs-right > .nav-tabs .active > a:hover, .tabs-right > .nav-tabs .active > a:focus { border-color: #ddd #ddd #ddd transparent; *border-left-color: #ffffff; } .nav > .disabled > a { color: #999999; } .nav > .disabled > a:hover, .nav > .disabled > a:focus { text-decoration: none; cursor: default; background-color: transparent; } .navbar { *position: relative; *z-index: 2; margin-bottom: 20px; overflow: visible; } .navbar-inner { min-height: 40px; padding-right: 20px; padding-left: 20px; background-color: #fafafa; background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2)); background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2); background-image: -o-linear-gradient(top, #ffffff, #f2f2f2); background-image: linear-gradient(to bottom, #ffffff, #f2f2f2); background-repeat: repeat-x; border: 1px solid #d4d4d4; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0); *zoom: 1; -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); } .navbar-inner:before, .navbar-inner:after { display: table; line-height: 0; content: ""; } .navbar-inner:after { clear: both; } .navbar .container { width: auto; } .nav-collapse.collapse { height: auto; overflow: visible; } .navbar .brand { display: block; float: left; padding: 10px 20px 10px; margin-left: -20px; font-size: 20px; font-weight: 200; color: #777777; text-shadow: 0 1px 0 #ffffff; } .navbar .brand:hover, .navbar .brand:focus { text-decoration: none; } .navbar-text { margin-bottom: 0; line-height: 40px; color: #777777; } .navbar-link { color: #777777; } .navbar-link:hover, .navbar-link:focus { color: #333333; } .navbar .divider-vertical { height: 40px; margin: 0 9px; border-right: 1px solid #ffffff; border-left: 1px solid #f2f2f2; } .navbar .btn, .navbar .btn-group { margin-top: 5px; } .navbar .btn-group .btn, .navbar .input-prepend .btn, .navbar .input-append .btn, .navbar .input-prepend .btn-group, .navbar .input-append .btn-group { margin-top: 0; } .navbar-form { margin-bottom: 0; *zoom: 1; } .navbar-form:before, .navbar-form:after { display: table; line-height: 0; content: ""; } .navbar-form:after { clear: both; } .navbar-form input, .navbar-form select, .navbar-form .radio, .navbar-form .checkbox { margin-top: 5px; } .navbar-form input, .navbar-form select, .navbar-form .btn { display: inline-block; margin-bottom: 0; } .navbar-form input[type="image"], .navbar-form input[type="checkbox"], .navbar-form input[type="radio"] { margin-top: 3px; } .navbar-form .input-append, .navbar-form .input-prepend { margin-top: 5px; white-space: nowrap; } .navbar-form .input-append input, .navbar-form .input-prepend input { margin-top: 0; } .navbar-search { position: relative; float: left; margin-top: 5px; margin-bottom: 0; } .navbar-search .search-query { padding: 4px 14px; margin-bottom: 0; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; font-weight: normal; line-height: 1; -webkit-border-radius: 15px; -moz-border-radius: 15px; border-radius: 15px; } .navbar-static-top { position: static; margin-bottom: 0; } .navbar-static-top .navbar-inner { -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0; } .navbar-fixed-top, .navbar-fixed-bottom { position: fixed; right: 0; left: 0; z-index: 1030; margin-bottom: 0; } .navbar-fixed-top .navbar-inner, .navbar-static-top .navbar-inner { border-width: 0 0 1px; } .navbar-fixed-bottom .navbar-inner { border-width: 1px 0 0; } .navbar-fixed-top .navbar-inner, .navbar-fixed-bottom .navbar-inner { padding-right: 0; padding-left: 0; -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0; } .navbar-static-top .container, .navbar-fixed-top .container, .navbar-fixed-bottom .container { width: 940px; } .navbar-fixed-top { top: 0; } .navbar-fixed-top .navbar-inner, .navbar-static-top .navbar-inner { -webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); -moz-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); } .navbar-fixed-bottom { bottom: 0; } .navbar-fixed-bottom .navbar-inner { -webkit-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); -moz-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); } .navbar .nav { position: relative; left: 0; display: block; float: left; margin: 0 10px 0 0; } .navbar .nav.pull-right { float: right; margin-right: 0; } .navbar .nav > li { float: left; } .navbar .nav > li > a { float: none; padding: 10px 15px 10px; color: #777777; text-decoration: none; text-shadow: 0 1px 0 #ffffff; } .navbar .nav .dropdown-toggle .caret { margin-top: 8px; } .navbar .nav > li > a:focus, .navbar .nav > li > a:hover { color: #333333; text-decoration: none; background-color: transparent; } .navbar .nav > .active > a, .navbar .nav > .active > a:hover, .navbar .nav > .active > a:focus { color: #555555; text-decoration: none; background-color: #e5e5e5; -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); -moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); } .navbar .btn-navbar { display: none; float: right; padding: 7px 10px; margin-right: 5px; margin-left: 5px; color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #ededed; *background-color: #e5e5e5; background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5)); background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5); background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5); background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5); background-repeat: repeat-x; border-color: #e5e5e5 #e5e5e5 #bfbfbf; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); } .navbar .btn-navbar:hover, .navbar .btn-navbar:focus, .navbar .btn-navbar:active, .navbar .btn-navbar.active, .navbar .btn-navbar.disabled, .navbar .btn-navbar[disabled] { color: #ffffff; background-color: #e5e5e5; *background-color: #d9d9d9; } .navbar .btn-navbar:active, .navbar .btn-navbar.active { background-color: #cccccc \9; } .navbar .btn-navbar .icon-bar { display: block; width: 18px; height: 2px; background-color: #f5f5f5; -webkit-border-radius: 1px; -moz-border-radius: 1px; border-radius: 1px; -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); } .btn-navbar .icon-bar + .icon-bar { margin-top: 3px; } .navbar .nav > li > .dropdown-menu:before { position: absolute; top: -7px; left: 9px; display: inline-block; border-right: 7px solid transparent; border-bottom: 7px solid #ccc; border-left: 7px solid transparent; border-bottom-color: rgba(0, 0, 0, 0.2); content: ''; } .navbar .nav > li > .dropdown-menu:after { position: absolute; top: -6px; left: 10px; display: inline-block; border-right: 6px solid transparent; border-bottom: 6px solid #ffffff; border-left: 6px solid transparent; content: ''; } .navbar-fixed-bottom .nav > li > .dropdown-menu:before { top: auto; bottom: -7px; border-top: 7px solid #ccc; border-bottom: 0; border-top-color: rgba(0, 0, 0, 0.2); } .navbar-fixed-bottom .nav > li > .dropdown-menu:after { top: auto; bottom: -6px; border-top: 6px solid #ffffff; border-bottom: 0; } .navbar .nav li.dropdown > a:hover .caret, .navbar .nav li.dropdown > a:focus .caret { border-top-color: #333333; border-bottom-color: #333333; } .navbar .nav li.dropdown.open > .dropdown-toggle, .navbar .nav li.dropdown.active > .dropdown-toggle, .navbar .nav li.dropdown.open.active > .dropdown-toggle { color: #555555; background-color: #e5e5e5; } .navbar .nav li.dropdown > .dropdown-toggle .caret { border-top-color: #777777; border-bottom-color: #777777; } .navbar .nav li.dropdown.open > .dropdown-toggle .caret, .navbar .nav li.dropdown.active > .dropdown-toggle .caret, .navbar .nav li.dropdown.open.active > .dropdown-toggle .caret { border-top-color: #555555; border-bottom-color: #555555; } .navbar .pull-right > li > .dropdown-menu, .navbar .nav > li > .dropdown-menu.pull-right { right: 0; left: auto; } .navbar .pull-right > li > .dropdown-menu:before, .navbar .nav > li > .dropdown-menu.pull-right:before { right: 12px; left: auto; } .navbar .pull-right > li > .dropdown-menu:after, .navbar .nav > li > .dropdown-menu.pull-right:after { right: 13px; left: auto; } .navbar .pull-right > li > .dropdown-menu .dropdown-menu, .navbar .nav > li > .dropdown-menu.pull-right .dropdown-menu { right: 100%; left: auto; margin-right: -1px; margin-left: 0; -webkit-border-radius: 6px 0 6px 6px; -moz-border-radius: 6px 0 6px 6px; border-radius: 6px 0 6px 6px; } .navbar-inverse .navbar-inner { background-color: #1b1b1b; background-image: -moz-linear-gradient(top, #222222, #111111); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111)); background-image: -webkit-linear-gradient(top, #222222, #111111); background-image: -o-linear-gradient(top, #222222, #111111); background-image: linear-gradient(to bottom, #222222, #111111); background-repeat: repeat-x; border-color: #252525; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0); } .navbar-inverse .brand, .navbar-inverse .nav > li > a { color: #999999; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } .navbar-inverse .brand:hover, .navbar-inverse .nav > li > a:hover, .navbar-inverse .brand:focus, .navbar-inverse .nav > li > a:focus { color: #ffffff; } .navbar-inverse .brand { color: #999999; } .navbar-inverse .navbar-text { color: #999999; } .navbar-inverse .nav > li > a:focus, .navbar-inverse .nav > li > a:hover { color: #ffffff; background-color: transparent; } .navbar-inverse .nav .active > a, .navbar-inverse .nav .active > a:hover, .navbar-inverse .nav .active > a:focus { color: #ffffff; background-color: #111111; } .navbar-inverse .navbar-link { color: #999999; } .navbar-inverse .navbar-link:hover, .navbar-inverse .navbar-link:focus { color: #ffffff; } .navbar-inverse .divider-vertical { border-right-color: #222222; border-left-color: #111111; } .navbar-inverse .nav li.dropdown.open > .dropdown-toggle, .navbar-inverse .nav li.dropdown.active > .dropdown-toggle, .navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle { color: #ffffff; background-color: #111111; } .navbar-inverse .nav li.dropdown > a:hover .caret, .navbar-inverse .nav li.dropdown > a:focus .caret { border-top-color: #ffffff; border-bottom-color: #ffffff; } .navbar-inverse .nav li.dropdown > .dropdown-toggle .caret { border-top-color: #999999; border-bottom-color: #999999; } .navbar-inverse .nav li.dropdown.open > .dropdown-toggle .caret, .navbar-inverse .nav li.dropdown.active > .dropdown-toggle .caret, .navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle .caret { border-top-color: #ffffff; border-bottom-color: #ffffff; } .navbar-inverse .navbar-search .search-query { color: #ffffff; background-color: #515151; border-color: #111111; -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); -webkit-transition: none; -moz-transition: none; -o-transition: none; transition: none; } .navbar-inverse .navbar-search .search-query:-moz-placeholder { color: #cccccc; } .navbar-inverse .navbar-search .search-query:-ms-input-placeholder { color: #cccccc; } .navbar-inverse .navbar-search .search-query::-webkit-input-placeholder { color: #cccccc; } .navbar-inverse .navbar-search .search-query:focus, .navbar-inverse .navbar-search .search-query.focused { padding: 5px 15px; color: #333333; text-shadow: 0 1px 0 #ffffff; background-color: #ffffff; border: 0; outline: 0; -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); } .navbar-inverse .btn-navbar { color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #0e0e0e; *background-color: #040404; background-image: -moz-linear-gradient(top, #151515, #040404); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404)); background-image: -webkit-linear-gradient(top, #151515, #040404); background-image: -o-linear-gradient(top, #151515, #040404); background-image: linear-gradient(to bottom, #151515, #040404); background-repeat: repeat-x; border-color: #040404 #040404 #000000; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); } .navbar-inverse .btn-navbar:hover, .navbar-inverse .btn-navbar:focus, .navbar-inverse .btn-navbar:active, .navbar-inverse .btn-navbar.active, .navbar-inverse .btn-navbar.disabled, .navbar-inverse .btn-navbar[disabled] { color: #ffffff; background-color: #040404; *background-color: #000000; } .navbar-inverse .btn-navbar:active, .navbar-inverse .btn-navbar.active { background-color: #000000 \9; } .breadcrumb { padding: 8px 15px; margin: 0 0 20px; list-style: none; background-color: #f5f5f5; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } .breadcrumb > li { display: inline-block; *display: inline; text-shadow: 0 1px 0 #ffffff; *zoom: 1; } .breadcrumb > li > .divider { padding: 0 5px; color: #ccc; } .breadcrumb > .active { color: #999999; } .pagination { margin: 20px 0; } .pagination ul { display: inline-block; *display: inline; margin-bottom: 0; margin-left: 0; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; *zoom: 1; -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); } .pagination ul > li { display: inline; } .pagination ul > li > a, .pagination ul > li > span { float: left; padding: 4px 12px; line-height: 20px; text-decoration: none; background-color: #ffffff; border: 1px solid #dddddd; border-left-width: 0; } .pagination ul > li > a:hover, .pagination ul > li > a:focus, .pagination ul > .active > a, .pagination ul > .active > span { background-color: #f5f5f5; } .pagination ul > .active > a, .pagination ul > .active > span { color: #999999; cursor: default; } .pagination ul > .disabled > span, .pagination ul > .disabled > a, .pagination ul > .disabled > a:hover, .pagination ul > .disabled > a:focus { color: #999999; cursor: default; background-color: transparent; } .pagination ul > li:first-child > a, .pagination ul > li:first-child > span { border-left-width: 1px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-topleft: 4px; } .pagination ul > li:last-child > a, .pagination ul > li:last-child > span { -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; -moz-border-radius-topright: 4px; -moz-border-radius-bottomright: 4px; } .pagination-centered { text-align: center; } .pagination-right { text-align: right; } .pagination-large ul > li > a, .pagination-large ul > li > span { padding: 11px 19px; font-size: 17.5px; } .pagination-large ul > li:first-child > a, .pagination-large ul > li:first-child > span { -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; -moz-border-radius-bottomleft: 6px; -moz-border-radius-topleft: 6px; } .pagination-large ul > li:last-child > a, .pagination-large ul > li:last-child > span { -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; -moz-border-radius-topright: 6px; -moz-border-radius-bottomright: 6px; } .pagination-mini ul > li:first-child > a, .pagination-small ul > li:first-child > a, .pagination-mini ul > li:first-child > span, .pagination-small ul > li:first-child > span { -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; -moz-border-radius-bottomleft: 3px; -moz-border-radius-topleft: 3px; } .pagination-mini ul > li:last-child > a, .pagination-small ul > li:last-child > a, .pagination-mini ul > li:last-child > span, .pagination-small ul > li:last-child > span { -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; -moz-border-radius-topright: 3px; -moz-border-radius-bottomright: 3px; } .pagination-small ul > li > a, .pagination-small ul > li > span { padding: 2px 10px; font-size: 11.9px; } .pagination-mini ul > li > a, .pagination-mini ul > li > span { padding: 0 6px; font-size: 10.5px; } .pager { margin: 20px 0; text-align: center; list-style: none; *zoom: 1; } .pager:before, .pager:after { display: table; line-height: 0; content: ""; } .pager:after { clear: both; } .pager li { display: inline; } .pager li > a, .pager li > span { display: inline-block; padding: 5px 14px; background-color: #fff; border: 1px solid #ddd; -webkit-border-radius: 15px; -moz-border-radius: 15px; border-radius: 15px; } .pager li > a:hover, .pager li > a:focus { text-decoration: none; background-color: #f5f5f5; } .pager .next > a, .pager .next > span { float: right; } .pager .previous > a, .pager .previous > span { float: left; } .pager .disabled > a, .pager .disabled > a:hover, .pager .disabled > a:focus, .pager .disabled > span { color: #999999; cursor: default; background-color: #fff; } .modal-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1040; background-color: #000000; } .modal-backdrop.fade { opacity: 0; } .modal-backdrop, .modal-backdrop.fade.in { opacity: 0.8; filter: alpha(opacity=80); } .modal { position: fixed; top: 10%; left: 50%; z-index: 1050; width: 560px; margin-left: -280px; background-color: #ffffff; border: 1px solid #999; border: 1px solid rgba(0, 0, 0, 0.3); *border: 1px solid #999; -webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px; outline: none; -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); -webkit-background-clip: padding-box; -moz-background-clip: padding-box; background-clip: padding-box; } .modal.fade { top: -25%; -webkit-transition: opacity 0.3s linear, top 0.3s ease-out; -moz-transition: opacity 0.3s linear, top 0.3s ease-out; -o-transition: opacity 0.3s linear, top 0.3s ease-out; transition: opacity 0.3s linear, top 0.3s ease-out; } .modal.fade.in { top: 10%; } .modal-header { padding: 9px 15px; border-bottom: 1px solid #eee; } .modal-header .close { margin-top: 2px; } .modal-header h3 { margin: 0; line-height: 30px; } .modal-body { position: relative; max-height: 400px; padding: 15px; overflow-y: auto; } .modal-form { margin-bottom: 0; } .modal-footer { padding: 14px 15px 15px; margin-bottom: 0; text-align: right; background-color: #f5f5f5; border-top: 1px solid #ddd; -webkit-border-radius: 0 0 6px 6px; -moz-border-radius: 0 0 6px 6px; border-radius: 0 0 6px 6px; *zoom: 1; -webkit-box-shadow: inset 0 1px 0 #ffffff; -moz-box-shadow: inset 0 1px 0 #ffffff; box-shadow: inset 0 1px 0 #ffffff; } .modal-footer:before, .modal-footer:after { display: table; line-height: 0; content: ""; } .modal-footer:after { clear: both; } .modal-footer .btn + .btn { margin-bottom: 0; margin-left: 5px; } .modal-footer .btn-group .btn + .btn { margin-left: -1px; } .modal-footer .btn-block + .btn-block { margin-left: 0; } .tooltip { position: absolute; z-index: 1030; display: block; font-size: 11px; line-height: 1.4; opacity: 0; filter: alpha(opacity=0); visibility: visible; } .tooltip.in { opacity: 0.8; filter: alpha(opacity=80); } .tooltip.top { padding: 5px 0; margin-top: -3px; } .tooltip.right { padding: 0 5px; margin-left: 3px; } .tooltip.bottom { padding: 5px 0; margin-top: 3px; } .tooltip.left { padding: 0 5px; margin-left: -3px; } .tooltip-inner { max-width: 200px; padding: 8px; color: #ffffff; text-align: center; text-decoration: none; background-color: #000000; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } .tooltip-arrow { position: absolute; width: 0; height: 0; border-color: transparent; border-style: solid; } .tooltip.top .tooltip-arrow { bottom: 0; left: 50%; margin-left: -5px; border-top-color: #000000; border-width: 5px 5px 0; } .tooltip.right .tooltip-arrow { top: 50%; left: 0; margin-top: -5px; border-right-color: #000000; border-width: 5px 5px 5px 0; } .tooltip.left .tooltip-arrow { top: 50%; right: 0; margin-top: -5px; border-left-color: #000000; border-width: 5px 0 5px 5px; } .tooltip.bottom .tooltip-arrow { top: 0; left: 50%; margin-left: -5px; border-bottom-color: #000000; border-width: 0 5px 5px; } .popover { position: absolute; top: 0; left: 0; z-index: 1010; display: none; max-width: 276px; padding: 1px; text-align: left; white-space: normal; background-color: #ffffff; border: 1px solid #ccc; border: 1px solid rgba(0, 0, 0, 0.2); -webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px; -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); -webkit-background-clip: padding-box; -moz-background-clip: padding; background-clip: padding-box; } .popover.top { margin-top: -10px; } .popover.right { margin-left: 10px; } .popover.bottom { margin-top: 10px; } .popover.left { margin-left: -10px; } .popover-title { padding: 8px 14px; margin: 0; font-size: 14px; font-weight: normal; line-height: 18px; background-color: #f7f7f7; border-bottom: 1px solid #ebebeb; -webkit-border-radius: 5px 5px 0 0; -moz-border-radius: 5px 5px 0 0; border-radius: 5px 5px 0 0; } .popover-title:empty { display: none; } .popover-content { padding: 9px 14px; } .popover .arrow, .popover .arrow:after { position: absolute; display: block; width: 0; height: 0; border-color: transparent; border-style: solid; } .popover .arrow { border-width: 11px; } .popover .arrow:after { border-width: 10px; content: ""; } .popover.top .arrow { bottom: -11px; left: 50%; margin-left: -11px; border-top-color: #999; border-top-color: rgba(0, 0, 0, 0.25); border-bottom-width: 0; } .popover.top .arrow:after { bottom: 1px; margin-left: -10px; border-top-color: #ffffff; border-bottom-width: 0; } .popover.right .arrow { top: 50%; left: -11px; margin-top: -11px; border-right-color: #999; border-right-color: rgba(0, 0, 0, 0.25); border-left-width: 0; } .popover.right .arrow:after { bottom: -10px; left: 1px; border-right-color: #ffffff; border-left-width: 0; } .popover.bottom .arrow { top: -11px; left: 50%; margin-left: -11px; border-bottom-color: #999; border-bottom-color: rgba(0, 0, 0, 0.25); border-top-width: 0; } .popover.bottom .arrow:after { top: 1px; margin-left: -10px; border-bottom-color: #ffffff; border-top-width: 0; } .popover.left .arrow { top: 50%; right: -11px; margin-top: -11px; border-left-color: #999; border-left-color: rgba(0, 0, 0, 0.25); border-right-width: 0; } .popover.left .arrow:after { right: 1px; bottom: -10px; border-left-color: #ffffff; border-right-width: 0; } .thumbnails { margin-left: -20px; list-style: none; *zoom: 1; } .thumbnails:before, .thumbnails:after { display: table; line-height: 0; content: ""; } .thumbnails:after { clear: both; } .row-fluid .thumbnails { margin-left: 0; } .thumbnails > li { float: left; margin-bottom: 20px; margin-left: 20px; } .thumbnail { display: block; padding: 4px; line-height: 20px; border: 1px solid #ddd; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); -webkit-transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out; -o-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; } a.thumbnail:hover, a.thumbnail:focus { border-color: #0088cc; -webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); -moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); } .thumbnail > img { display: block; max-width: 100%; margin-right: auto; margin-left: auto; } .thumbnail .caption { padding: 9px; color: #555555; } .media, .media-body { overflow: hidden; *overflow: visible; zoom: 1; } .media, .media .media { margin-top: 15px; } .media:first-child { margin-top: 0; } .media-object { display: block; } .media-heading { margin: 0 0 5px; } .media > .pull-left { margin-right: 10px; } .media > .pull-right { margin-left: 10px; } .media-list { margin-left: 0; list-style: none; } .label, .badge { display: inline-block; padding: 2px 4px; font-size: 11.844px; font-weight: bold; line-height: 14px; color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); white-space: nowrap; vertical-align: baseline; background-color: #999999; } .label { -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; } .badge { padding-right: 9px; padding-left: 9px; -webkit-border-radius: 9px; -moz-border-radius: 9px; border-radius: 9px; } .label:empty, .badge:empty { display: none; } a.label:hover, a.label:focus, a.badge:hover, a.badge:focus { color: #ffffff; text-decoration: none; cursor: pointer; } .label-important, .badge-important { background-color: #b94a48; } .label-important[href], .badge-important[href] { background-color: #953b39; } .label-warning, .badge-warning { background-color: #f89406; } .label-warning[href], .badge-warning[href] { background-color: #c67605; } .label-success, .badge-success { background-color: #468847; } .label-success[href], .badge-success[href] { background-color: #356635; } .label-info, .badge-info { background-color: #3a87ad; } .label-info[href], .badge-info[href] { background-color: #2d6987; } .label-inverse, .badge-inverse { background-color: #333333; } .label-inverse[href], .badge-inverse[href] { background-color: #1a1a1a; } .btn .label, .btn .badge { position: relative; top: -1px; } .btn-mini .label, .btn-mini .badge { top: 0; } @-webkit-keyframes progress-bar-stripes { from { background-position: 40px 0; } to { background-position: 0 0; } } @-moz-keyframes progress-bar-stripes { from { background-position: 40px 0; } to { background-position: 0 0; } } @-ms-keyframes progress-bar-stripes { from { background-position: 40px 0; } to { background-position: 0 0; } } @-o-keyframes progress-bar-stripes { from { background-position: 0 0; } to { background-position: 40px 0; } } @keyframes progress-bar-stripes { from { background-position: 40px 0; } to { background-position: 0 0; } } .progress { height: 20px; margin-bottom: 20px; overflow: hidden; background-color: #f7f7f7; background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9)); background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9); background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9); background-image: linear-gradient(to bottom, #f5f5f5, #f9f9f9); background-repeat: repeat-x; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0); -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); } .progress .bar { float: left; width: 0; height: 100%; font-size: 12px; color: #ffffff; text-align: center; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #0e90d2; background-image: -moz-linear-gradient(top, #149bdf, #0480be); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be)); background-image: -webkit-linear-gradient(top, #149bdf, #0480be); background-image: -o-linear-gradient(top, #149bdf, #0480be); background-image: linear-gradient(to bottom, #149bdf, #0480be); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0); -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; -webkit-transition: width 0.6s ease; -moz-transition: width 0.6s ease; -o-transition: width 0.6s ease; transition: width 0.6s ease; } .progress .bar + .bar { -webkit-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); -moz-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); } .progress-striped .bar { background-color: #149bdf; background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -webkit-background-size: 40px 40px; -moz-background-size: 40px 40px; -o-background-size: 40px 40px; background-size: 40px 40px; } .progress.active .bar { -webkit-animation: progress-bar-stripes 2s linear infinite; -moz-animation: progress-bar-stripes 2s linear infinite; -ms-animation: progress-bar-stripes 2s linear infinite; -o-animation: progress-bar-stripes 2s linear infinite; animation: progress-bar-stripes 2s linear infinite; } .progress-danger .bar, .progress .bar-danger { background-color: #dd514c; background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35)); background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35); background-image: -o-linear-gradient(top, #ee5f5b, #c43c35); background-image: linear-gradient(to bottom, #ee5f5b, #c43c35); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0); } .progress-danger.progress-striped .bar, .progress-striped .bar-danger { background-color: #ee5f5b; background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .progress-success .bar, .progress .bar-success { background-color: #5eb95e; background-image: -moz-linear-gradient(top, #62c462, #57a957); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957)); background-image: -webkit-linear-gradient(top, #62c462, #57a957); background-image: -o-linear-gradient(top, #62c462, #57a957); background-image: linear-gradient(to bottom, #62c462, #57a957); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0); } .progress-success.progress-striped .bar, .progress-striped .bar-success { background-color: #62c462; background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .progress-info .bar, .progress .bar-info { background-color: #4bb1cf; background-image: -moz-linear-gradient(top, #5bc0de, #339bb9); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9)); background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9); background-image: -o-linear-gradient(top, #5bc0de, #339bb9); background-image: linear-gradient(to bottom, #5bc0de, #339bb9); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0); } .progress-info.progress-striped .bar, .progress-striped .bar-info { background-color: #5bc0de; background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .progress-warning .bar, .progress .bar-warning { background-color: #faa732; background-image: -moz-linear-gradient(top, #fbb450, #f89406); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); background-image: -webkit-linear-gradient(top, #fbb450, #f89406); background-image: -o-linear-gradient(top, #fbb450, #f89406); background-image: linear-gradient(to bottom, #fbb450, #f89406); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); } .progress-warning.progress-striped .bar, .progress-striped .bar-warning { background-color: #fbb450; background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .accordion { margin-bottom: 20px; } .accordion-group { margin-bottom: 2px; border: 1px solid #e5e5e5; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } .accordion-heading { border-bottom: 0; } .accordion-heading .accordion-toggle { display: block; padding: 8px 15px; } .accordion-toggle { cursor: pointer; } .accordion-inner { padding: 9px 15px; border-top: 1px solid #e5e5e5; } .carousel { position: relative; margin-bottom: 20px; line-height: 1; } .carousel-inner { position: relative; width: 100%; overflow: hidden; } .carousel-inner > .item { position: relative; display: none; -webkit-transition: 0.6s ease-in-out left; -moz-transition: 0.6s ease-in-out left; -o-transition: 0.6s ease-in-out left; transition: 0.6s ease-in-out left; } .carousel-inner > .item > img, .carousel-inner > .item > a > img { display: block; line-height: 1; } .carousel-inner > .active, .carousel-inner > .next, .carousel-inner > .prev { display: block; } .carousel-inner > .active { left: 0; } .carousel-inner > .next, .carousel-inner > .prev { position: absolute; top: 0; width: 100%; } .carousel-inner > .next { left: 100%; } .carousel-inner > .prev { left: -100%; } .carousel-inner > .next.left, .carousel-inner > .prev.right { left: 0; } .carousel-inner > .active.left { left: -100%; } .carousel-inner > .active.right { left: 100%; } .carousel-control { position: absolute; top: 40%; left: 15px; width: 40px; height: 40px; margin-top: -20px; font-size: 60px; font-weight: 100; line-height: 30px; color: #ffffff; text-align: center; background: #222222; border: 3px solid #ffffff; -webkit-border-radius: 23px; -moz-border-radius: 23px; border-radius: 23px; opacity: 0.5; filter: alpha(opacity=50); } .carousel-control.right { right: 15px; left: auto; } .carousel-control:hover, .carousel-control:focus { color: #ffffff; text-decoration: none; opacity: 0.9; filter: alpha(opacity=90); } .carousel-indicators { position: absolute; top: 15px; right: 15px; z-index: 5; margin: 0; list-style: none; } .carousel-indicators li { display: block; float: left; width: 10px; height: 10px; margin-left: 5px; text-indent: -999px; background-color: #ccc; background-color: rgba(255, 255, 255, 0.25); border-radius: 5px; } .carousel-indicators .active { background-color: #fff; } .carousel-caption { position: absolute; right: 0; bottom: 0; left: 0; padding: 15px; background: #333333; background: rgba(0, 0, 0, 0.75); } .carousel-caption h4, .carousel-caption p { line-height: 20px; color: #ffffff; } .carousel-caption h4 { margin: 0 0 5px; } .carousel-caption p { margin-bottom: 0; } .hero-unit { padding: 60px; margin-bottom: 30px; font-size: 18px; font-weight: 200; line-height: 30px; color: inherit; background-color: #eeeeee; -webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px; } .hero-unit h1 { margin-bottom: 0; font-size: 60px; line-height: 1; letter-spacing: -1px; color: inherit; } .hero-unit li { line-height: 30px; } .pull-right { float: right; } .pull-left { float: left; } .hide { display: none; } .show { display: block; } .invisible { visibility: hidden; } .affix { position: fixed; } ================================================ FILE: src/css/lib/fiddler.css ================================================ html,body{ width: 100%; height: 100%; overflow: hidden; } .icon.disabled{ opacity: 0.4; } ================================================ FILE: src/css/lib/shCoreDefault.css ================================================ /** * SyntaxHighlighter * http://alexgorbatchev.com/SyntaxHighlighter * * SyntaxHighlighter is donationware. If you are using it, please donate. * http://alexgorbatchev.com/SyntaxHighlighter/donate.html * * @version * 3.0.83 (July 02 2010) * * @copyright * Copyright (C) 2004-2010 Alex Gorbatchev. * * @license * Dual licensed under the MIT and GPL licenses. */ .syntaxhighlighter a, .syntaxhighlighter div, .syntaxhighlighter code, .syntaxhighlighter table, .syntaxhighlighter table td, .syntaxhighlighter table tr, .syntaxhighlighter table tbody, .syntaxhighlighter table thead, .syntaxhighlighter table caption, .syntaxhighlighter textarea { -moz-border-radius: 0 0 0 0 !important; -webkit-border-radius: 0 0 0 0 !important; background: none !important; border: 0 !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0 !important; outline: 0 !important; overflow: visible !important; padding: 0 !important; position: static !important; right: auto !important; text-align: left !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-weight: normal !important; font-style: normal !important; font-size: 1em !important; min-height: inherit !important; min-height: auto !important; } .syntaxhighlighter { width: 100% !important; margin: 1em 0 1em 0 !important; position: relative !important; overflow: auto !important; font-size: 1em !important; } .syntaxhighlighter.source { overflow: hidden !important; } .syntaxhighlighter .bold { font-weight: bold !important; } .syntaxhighlighter .italic { font-style: italic !important; } .syntaxhighlighter .line { white-space: pre !important; } .syntaxhighlighter table { width: 100% !important; } .syntaxhighlighter table caption { text-align: left !important; padding: .5em 0 0.5em 1em !important; } .syntaxhighlighter table td.code { width: 100% !important; } .syntaxhighlighter table td.code .container { position: relative !important; } .syntaxhighlighter table td.code .container textarea { box-sizing: border-box !important; position: absolute !important; left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; border: none !important; background: white !important; padding-left: 1em !important; overflow: hidden !important; white-space: pre !important; } .syntaxhighlighter table td.gutter .line { text-align: right !important; padding: 0 0.5em 0 1em !important; } .syntaxhighlighter table td.code .line { padding: 0 1em !important; } .syntaxhighlighter.nogutter td.code .container textarea, .syntaxhighlighter.nogutter td.code .line { padding-left: 0em !important; } .syntaxhighlighter.show { display: block !important; } .syntaxhighlighter.collapsed table { display: none !important; } .syntaxhighlighter.collapsed .toolbar { padding: 0.1em 0.8em 0em 0.8em !important; font-size: 1em !important; position: static !important; width: auto !important; height: auto !important; } .syntaxhighlighter.collapsed .toolbar span { display: inline !important; margin-right: 1em !important; } .syntaxhighlighter.collapsed .toolbar span a { padding: 0 !important; display: none !important; } .syntaxhighlighter.collapsed .toolbar span a.expandSource { display: inline !important; } .syntaxhighlighter .toolbar { position: absolute !important; right: 1px !important; top: 1px !important; width: 11px !important; height: 11px !important; font-size: 10px !important; z-index: 10 !important; } .syntaxhighlighter .toolbar span.title { display: inline !important; } .syntaxhighlighter .toolbar a { display: block !important; text-align: center !important; text-decoration: none !important; padding-top: 1px !important; } .syntaxhighlighter .toolbar a.expandSource { display: none !important; } .syntaxhighlighter.ie { font-size: .9em !important; padding: 1px 0 1px 0 !important; } .syntaxhighlighter.ie .toolbar { line-height: 8px !important; } .syntaxhighlighter.ie .toolbar a { padding-top: 0px !important; } .syntaxhighlighter.printing .line.alt1 .content, .syntaxhighlighter.printing .line.alt2 .content, .syntaxhighlighter.printing .line.highlighted .number, .syntaxhighlighter.printing .line.highlighted.alt1 .content, .syntaxhighlighter.printing .line.highlighted.alt2 .content { background: none !important; } .syntaxhighlighter.printing .line .number { color: #bbbbbb !important; } .syntaxhighlighter.printing .line .content { color: black !important; } .syntaxhighlighter.printing .toolbar { display: none !important; } .syntaxhighlighter.printing a { text-decoration: none !important; } .syntaxhighlighter.printing .plain, .syntaxhighlighter.printing .plain a { color: black !important; } .syntaxhighlighter.printing .comments, .syntaxhighlighter.printing .comments a { color: #008200 !important; } .syntaxhighlighter.printing .string, .syntaxhighlighter.printing .string a { color: blue !important; } .syntaxhighlighter.printing .keyword { color: #006699 !important; font-weight: bold !important; } .syntaxhighlighter.printing .preprocessor { color: gray !important; } .syntaxhighlighter.printing .variable { color: #aa7700 !important; } .syntaxhighlighter.printing .value { color: #009900 !important; } .syntaxhighlighter.printing .functions { color: #ff1493 !important; } .syntaxhighlighter.printing .constants { color: #0066cc !important; } .syntaxhighlighter.printing .script { font-weight: bold !important; } .syntaxhighlighter.printing .color1, .syntaxhighlighter.printing .color1 a { color: gray !important; } .syntaxhighlighter.printing .color2, .syntaxhighlighter.printing .color2 a { color: #ff1493 !important; } .syntaxhighlighter.printing .color3, .syntaxhighlighter.printing .color3 a { color: red !important; } .syntaxhighlighter.printing .break, .syntaxhighlighter.printing .break a { color: black !important; } .syntaxhighlighter { background-color: white !important; } .syntaxhighlighter .line.alt1 { background-color: white !important; } .syntaxhighlighter .line.alt2 { background-color: white !important; } .syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 { background-color: #e0e0e0 !important; } .syntaxhighlighter .line.highlighted.number { color: black !important; } .syntaxhighlighter table caption { color: black !important; } .syntaxhighlighter .gutter { color: #afafaf !important; } .syntaxhighlighter .gutter .line { border-right: 3px solid #6ce26c !important; } .syntaxhighlighter .gutter .line.highlighted { background-color: #6ce26c !important; color: white !important; } .syntaxhighlighter.printing .line .content { border: none !important; } .syntaxhighlighter.collapsed { overflow: visible !important; } .syntaxhighlighter.collapsed .toolbar { color: blue !important; background: white !important; border: 1px solid #6ce26c !important; } .syntaxhighlighter.collapsed .toolbar a { color: blue !important; } .syntaxhighlighter.collapsed .toolbar a:hover { color: red !important; } .syntaxhighlighter .toolbar { color: white !important; background: #6ce26c !important; border: none !important; } .syntaxhighlighter .toolbar a { color: white !important; } .syntaxhighlighter .toolbar a:hover { color: black !important; } .syntaxhighlighter .plain, .syntaxhighlighter .plain a { color: black !important; } .syntaxhighlighter .comments, .syntaxhighlighter .comments a { color: #008200 !important; } .syntaxhighlighter .string, .syntaxhighlighter .string a { color: blue !important; } .syntaxhighlighter .keyword { color: #006699 !important; } .syntaxhighlighter .preprocessor { color: gray !important; } .syntaxhighlighter .variable { color: #aa7700 !important; } .syntaxhighlighter .value { color: #009900 !important; } .syntaxhighlighter .functions { color: #ff1493 !important; } .syntaxhighlighter .constants { color: #0066cc !important; } .syntaxhighlighter .script { font-weight: bold !important; color: #006699 !important; background-color: none !important; } .syntaxhighlighter .color1, .syntaxhighlighter .color1 a { color: gray !important; } .syntaxhighlighter .color2, .syntaxhighlighter .color2 a { color: #ff1493 !important; } .syntaxhighlighter .color3, .syntaxhighlighter .color3 a { color: red !important; } .syntaxhighlighter .keyword { font-weight: bold !important; } ================================================ FILE: src/css/lib.css ================================================ @import url("lib/bootstrap.css"); @import url("lib/fiddler.css"); @import url("lib/shCoreDefault.css"); ================================================ FILE: src/css/page/options.css ================================================ .table tr.disabled{ background: #eee; color: #999; } #fiddler{ padding: 0 2px; } header.navbar{ margin-bottom: 5px; } #requestList{ position: fixed; top: 50px; left: 2px; right: 2px; bottom: 0px; overflow: auto; } #requestList tbody tr a.icon-url{ display: none; } #requestList tbody tr.err{ color: red; } #requestList tbody tr.get:hover a.icon-url{ display: inline; } .disable-cache{ position: relative; top: -4px; } #requestDetail{ position: fixed; display: block; top: 50px; right: -600px; width: 600px; bottom: 0; background: #fff; border-left:1px solid #dddddd; border-top-right-radius: 4px; -webkit-box-shadow: 0 0 5px 0 #eee; opacity: 0; -webkit-transition: all 0.3s linear; } #requestDetail.open{ right: 2px; opacity: 1; } #requestDetail .icon-remove{ position: absolute; top: 10px; left: 10px; cursor: pointer; } #requestDetail .hd{ background:#fefefe; position:relative; height: 38px; overflow: hidden; } #requestDetail .tab-content{ overflow: auto; position: absolute; top: 38px; bottom: 0; left: 0; right: 0; } #tab-headers, #tab-preview,#tab-response,#tab-beautify{ padding: 10px 20px; width: 550px; word-wrap: break-word; } #tab-beautify{ padding: 0; width: 590px; } #tab-headers .content .item{ width: 550px; word-wrap: break-word; } #tab-headers .content .item b{ color: #666; font-size: 13px; } #tab-headers .content>b{ display: block; margin-top: 5px; font-size: 14px; padding-left: 10px; background: url(../../img/treeDown.png) no-repeat left center; cursor: pointer; margin-left: -10px; -webkit-user-select: none; } #tab-headers .content>b span.num{ display: none; color: #666; font-size: 12px; font-weight: normal; } #tab-headers .content .headers-list{ padding-left: 10px; } #tab-headers .content>b.treeRight{ background-image: url(../../img/treeRight.png); } #tab-headers .content>b.treeRight .num{ display: inline; } #requestDetail .tab-content .tab-pane{ display: none; } #requestDetail .tab-content .tab-pane.active{ display: block; } #tab-preview img{ display: block; margin: auto; box-shadow: 1px 1px 5px #ccc; max-width: 560px; margin-bottom: 5px; } #tab-preview code{ white-space: normal !important; } #tab-preview .syntaxhighlighter code{ width: auto !important; } #tab-preview .syntaxhighlighter .line{ width: 550px !important; overflow: auto !important; } #autoResponseList{ position: fixed; top: 40px; right: 20px; width: 560px; bottom: 20px; z-index: 1000; background: #fff; left: auto; padding: 10px; max-width: 600px; display: block;; -webkit-transform: scale(0); opacity: 0; -webkit-transition: all 0.3s cubic-bezier(.4,.83,.32,1.33); -webkit-transform-origin: right top; } #autoResponseList.open{ opacity: 1; -webkit-transform: scale(1); } #autoResponseList .arrow{ left: auto; right: 50px; } #autoResponseList .hd{ height: 40px; line-height: 40px; -webkit-user-select: none; } #autoResponseList .hd label{ margin-left: 7px; height: 40px; line-height: 40px; } #autoResponseList .hd label input{ position: relative; top: -2px; } #autoResponseList .btn-add{ position: absolute; right: 10px; top: 15px; } #autoResponseList .rule-list{ position: absolute; bottom: 150px; overflow: auto; top: 50px; width: 560px; } #autoResponseList .rule-list p.pattern{ width: 200px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; } #autoResponseList .rule-list p.replace{ width: 210px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; } #autoResponseList .rule-list .rule-check{ position: relative; top: -2px; } #autoResponseList .rule-edit{ position: absolute; bottom: 10px; left: 10px; right: 10px; background: #fff; } #autoResponseList .rule-edit .name{ display: inline-block; width: 70px; text-align: right; padding-right: 10px; } #autoResponseList .rule-edit input.rule-pattern-type, #autoResponseList .rule-edit input.rule-replace-type{ width: 60px; padding-right: 40px; padding-left: 10px; } #autoResponseList .rule-edit input.rule-pattern, #autoResponseList .rule-edit input.rule-replace{ margin-left: -30px; width: 226px; } #autoResponseList .rule-edit .btn-save{ position: absolute; right: 10px; bottom: 20px; } #autoResponseList .rule-edit .btn-select{ position:relative;top:-5px;left:-40px } #autoResponseList .rule-edit .rule-edit-item{ position: relative; } #autoResponseList .rule-edit .dropdown-menu{ top: auto; display: none; bottom: 40px; left: 83px; width: 20px; min-width: 110px; -webkit-box-shadow: 0 0 0 #000; } #autoResponseList .rule-edit .dropdown-menu > li > a{ padding: 3px 10px; } #autoResponseList .rule-edit .dropdown-menu li{ position: relative; } #autoResponseList .rule-edit .dropdown-menu li input[type="file"]{ position: absolute; top: 0px; z-index: 100; opacity: 0; } ================================================ FILE: src/html/background.html ================================================ Fiddler ================================================ FILE: src/html/devtools.html ================================================ Fiddler ================================================ FILE: src/html/options.html ================================================ Fiddler
Type Status Method Url Host Ip Size
Enable If Request Matches... The Response With... Edit
Rule Editor
================================================ FILE: src/js/component/config.js ================================================ var Fiddler_Config = function(){ "use strict"; var config = { encoding: "utf-8", enable_auto_response: true, disable_cache: false, rules: [] }; var _key = "Fiddler"; return { init: function(){ this.loadConfig(); }, clearRules: function(){ config.rules = []; }, getEncoding: function(){ return config.encoding; }, setEncoding: function(encoding){ config.encoding = encoding; return this; }, getConfig: function(name){ return config[name] || ""; }, setConfig: function(name, value){ config[name] = value; this.saveConfig(); }, addRule: function(data){ config.rules.push(data); this.saveConfig(); }, getRules: function(){ return config.rules || []; }, loadConfig: function(){ var data = localStorage.getItem(_key) || "{}"; data = JSON.parse(data); Fiddler.mix(config, data, true); }, saveConfig: function(){ var data = JSON.stringify(config); localStorage.setItem(_key, data); } } }(); ================================================ FILE: src/js/component/event.js ================================================ /** * 事件相关 * @return {[type]} [description] */ var Fiddler_Event = function(){ "use strict"; function init(cleanCheckHandler){ chrome.webRequest.MAX_HANDLER_BEHAVIOR_CHANGED_CALLS_PER_10_MINUTES = 10000; chrome.webRequest.onBeforeRequest.addListener(function(details) { if (!Fiddler.checkUrl(details.url)) { return {}; }; var result = Fiddler_Rule.fireSome("onBeforeRequest", details); if (result) { return result; }; }, {urls:[""]}, ["blocking", "requestBody"] ); chrome.webRequest.onBeforeSendHeaders.addListener(function(details) { if (!Fiddler.checkUrl(details.url)) { return {}; }; var result = Fiddler_Rule.fireMerge("onBeforeSendHeaders", details); if (result) { if (result.cancel) { return { cancel: true } }; return { requestHeaders: result.requestHeaders }; }; }, {urls: [""]}, ["blocking", "requestHeaders"] ); chrome.webRequest.onCompleted.addListener(function(details) { //clean memory cache if (details.type == 'main_frame' && cleanCheckHandler && cleanCheckHandler()) { //chrome.webRequest.handlerBehaviorChanged(); }; if (!Fiddler.checkUrl(details.url)) { return {}; }; Fiddler_Rule.fire("onCompleted", details); }, {urls: [""]}, ["responseHeaders"]); } return { init: init } }(); ================================================ FILE: src/js/component/file.js ================================================ /** * 文件读取相关 */ var Fiddler_File = function(){ "use strict"; /** * [encodeText description] * @param {[type]} text [description] * @param {[type]} type [description] * @return {[type]} [description] */ function encodeText(text, type){ if (type == 'script') { text = text.replace(/[\u0080-\uffff]/g, function($0) {         var tmp = $0.charCodeAt(0).toString(16);         return "\\u" + new Array(5 - tmp.length).join('0') + tmp;     }); }; if (type == 'main_frame') { //text = btoa(text) }else{ text = encodeURIComponent(text); } return text; } function getMimeType(file) { var idx = file.lastIndexOf("."); return (idx == -1) ? "text/plain" : MimeTea.cup(file.substring(++idx)); } return { /** * get local file content by xhr * @param {[type]} file [description] * @return {[type]} [description] */ getLocalFile: function(file, encoding, type){ var xhr = new XMLHttpRequest(); xhr.open('GET', file, false); xhr.send(null); var text = xhr.responseText || xhr.responseXML; if (!text) { return false; }; var mimeType = getMimeType(file); if (encoding) { text = "data:"+mimeType+"; " + encoding + "," + encodeText(text, type); }; return text; }, checkFileExist: function(file){ return !!this.getLocalFile(file); }, /** * get remote file content * @return {[type]} [description] */ getRemoteFile: function(requestId){ var detail = Fiddler_Resource.getItem(requestId); var url = detail.url; if (url.indexOf('?') == -1) { url += '?fiddler=' + requestId; }else{ url += '&fiddler=' + requestId; } //var headers = Fiddler_Rule.headersToObj(detail.requestHeaders); var method = detail.method; var deferred = when.defer(); $.ajax({ url: url, method: method, complete: function(data){ data = data.responseText || data.responseXML; deferred.resolve(data); } }) return deferred.promise; } } }(); ================================================ FILE: src/js/component/resource.js ================================================ /** * request resource * @return {[type]} [description] */ var Fiddler_Resource = function(){ "use strict"; var _request = {}; var resource = Fiddler.implement({}, Fiddler.CustEvent); var parentRequestId = 0; Fiddler.mix(resource, { clearResource: function(){ _request = {}; }, add: function(data, type){ var requestId = data.requestId; data[type + "Time"] = data.timeStamp; if (!(requestId in _request)) { _request[requestId] = {}; Fiddler.mix(_request[requestId], data); }else{ for(var name in data){ _request[requestId][name] = data[name]; } }; if (type == 'onCompleted') { var resourceType = _request[requestId].type; var method = _request[requestId].method; if (resourceType == "main_frame" && method == "GET" ) { parentRequestId = requestId; _request[requestId].parentRequestId = 0; }else{ _request[requestId].parentRequestId = parentRequestId; } //content-size _request[requestId].size = 0; var responseHeaders = _request[requestId].responseHeaders || []; responseHeaders.some(function(item){ if (item.name == 'Content-Length') { _request[requestId].size = item.value; return true; }; }); //cookie var requestHeaders = _request[requestId].requestHeaders || []; var cookie = ''; requestHeaders.some(function(item){ if (item.name == 'Cookie') { cookie = item.value; return true; }; }); if (cookie) { _request[requestId].cookieSize = cookie.length; var cookieObj = {}; cookie = cookie.split(/;\s*/g); cookie.forEach(function(item){ item = item.split('='); cookieObj[item[0]] = unescape(item[1]); }); _request[requestId].cookieLength = cookie.length; _request[requestId].cookie = cookieObj; }; var urlInfo = Fiddler.getUrlDetail(data.url); Fiddler.mix(_request[requestId], urlInfo, true); this.fire("onCompleted", _request[requestId]); }; }, getItem: function(requestId){ return _request[requestId] || {}; }, getResoure: function(){ return _request; }, getContent: function(requestId){ var deferred = when.defer(); var detail = _request[requestId]; if (detail.content) { return deferred.resolve(detail.content); }else{ Fiddler_File.getRemoteFile(requestId).then(function(data){ _request[requestId].content = data; deferred.resolve(data); }) } return deferred.promise; }, setContent: function(url, content){ if (!content) { return false; }; var getRequestId = 0; for(var requestId in _request){ if (_request[requestId]['url'] === url) { getRequestId = requestId; }; }; if (getRequestId) { _request[getRequestId].content = content; _request[getRequestId].size = content.length; }; }, getImgRect: function(url, oldUrl, deferred){ if (!deferred) { deferred = when.defer(); }; var img = new Image(); var self = this; img.onload = function(){ deferred.resolve({ width: this.width, height: this.height, old: url === oldUrl }) }; img.onerror = function(){ if (url == oldUrl) { deferred.resolve({ width: this.width, height: this.height }) }else{ return self.getImgRect(oldUrl, oldUrl, deferred); } } img.src = url; return deferred.promise; }, getImgUrl: function(requestId){ var detail = _request[requestId]; var content = detail.content; var ext = Fiddler.getFileExt(detail.url); if (ext && content) { var prefix = content.substr(100); var regexp = /^[\w\+\/\=]+$/; if (!regexp.test(prefix)) { content = Base64.encode(content); }; return "data:image/"+ext+";base64," + content; }; return detail.url; }, getSize: function(requestId){ var deferred = when.defer(); var detail = _request[requestId]; if (detail.size) { return deferred.resolve(detail.size); }else{ if (detail.content) { _request[requestId].size = detail.content.length; return deferred.resolve(_request[requestId].size); }; var self = this; this.getContent(requestId).then(function(){ return self.getSize(requestId); }).then(function(size){ deferred.resolve(size); }) } return deferred.promise; }, getQueryData: function(url){ var queryUrl = Fiddler.queryUrl(url) || {}; var ret = { data: null, length: 0 } for(var name in queryUrl){ if (queryUrl[name] && queryUrl[name].join) { queryUrl[name] = "[" + queryUrl[name].join(", ") + "]"; }; ret.length++; }; if (ret.length) { ret.data = queryUrl; }; return ret; } }) return resource; }() ================================================ FILE: src/js/component/rule.js ================================================ /** * rule * @return {[type]} [description] */ var Fiddler_Rule = function(){ "use strict"; /** * event types * @type {Array} */ var eventTypes = [ "onBeforeRequest", "onBeforeSendHeaders", "onSendHeaders", "onHeadersReceived", "onBeforeRedirect", "onResponseStarted", "onErrorOccurred", "onCompleted" ]; var rule = Fiddler.implement({}, Fiddler.CustEvent); eventTypes.forEach(function(item){ rule[item] = function(callback){ this.on(item, callback); } }); var _isResouceListening = false; var _fileErrorFn = null; Fiddler.mix(rule, { match: function(requestInfo, rule){ if (rule.patternType == "Method") { return this.matchMethod(requestInfo, rule); }else if(rule.patternType == 'Header'){ return this.matchHeader(requestInfo, rule); }else{ return this.matchUrl(requestInfo, rule); } }, matchUrl: function(requestInfo, rule){ var url = requestInfo.url; var pattern = rule.pattern; if (rule.patternType == 'String') { return url.indexOf(pattern) >= 0; }; if (pattern.indexOf('/') != 0) { pattern = '/' + pattern + '/'; }; try{ pattern.replace(/^\/(.*)\/([mig]*)$/g, function(a, b, c) { pattern = new RegExp(b, c || ''); }); if (pattern.test(url)) { return true; }; }catch(e){} return false; }, matchMethod: function(requestInfo, rule){ var method = requestInfo.method; if (rule.replace == requestInfo.url) { return false; }; return rule.pattern.toLowerCase() == method.toLowerCase(); }, matchHeader: function(requestInfo, rule){ var pattern = (rule.pattern || "").split('='); var hName = pattern.shift().toLowerCase(); var hValue = pattern.join('='); var headers = requestInfo.requestHeaders || []; return headers.some(function(item){ var name = item.name.toLowerCase(); var value = item.value; if (name == hName) { if (hValue == value) { return true; }; if (value.indexOf(hValue) == 0) { return true; }; }; return false; }) }, /** * file replace * @param {[type]} pattern [description] * @param {[type]} filename [description] * @return {[type]} [description] */ addFileReplaceRule: function(rule){ var self = this; this.onBeforeRequest(function(data){ var encoding = Fiddler_Config.getEncoding(); if (self.match(data.data, rule)) { var filename = rule.replace; var content = Fiddler_File.getLocalFile(filename, encoding, data.data.type); if (content === false) { self.fire("fileError", filename); return false; }; return { redirectUrl: content } }; return false; }) }, /** * dir replace * @param {[type]} urlPrefix [description] * @param {[type]} filePath [description] * @return {[type]} [description] */ addDirReplaceRule: function(rule){ var self = this; this.onBeforeRequest(function(data){ var url = data.data.url; var encoding = Fiddler_Config.getEncoding(); var pos = url.indexOf(rule.pattern); if (pos === 0) { var suffix = url.substr(rule.pattern.length); var file = Fiddler.pathAdd(rule.replace, suffix); var content = Fiddler_File.getLocalFile(file, encoding, data.data.type); if (content === false) { self.fire("fileError", file); return false; }; return { redirectUrl: content } }; return false; }) }, /** * url replace * @param {[type]} urlPrefix [description] * @param {[type]} targetPrefix [description] * @return {[type]} [description] */ addUrlReplaceRule: function(rule){ var self = this; this.onBeforeRequest(function(data){ if (self.match(data.data, rule)) { var url = rule.replace; return { redirectUrl: url } }; return false; }) }, /** * delay time * @param {[type]} pattern [description] * @param {[type]} delayTime [description] * @return {[type]} [description] */ addDelayRule: function(rule){ var self = this; this.onBeforeSendHeaders(function(data){ if (self.match(data.data, rule)) { var delayTime = parseInt(rule.replace, 10) || 0; Fiddler.delay(delayTime); return false; }; return false; }) }, /** * cancel rule * @return {[type]} [description] */ addCancelRule: function(rule){ var self = this; this.onBeforeSendHeaders(function(data){ console.log(data.data); if (self.match(data.data, rule)) { data.data.cancel = true; }; return data.data; }) }, addHeaderRule: function(rule){ var self = this; this.onBeforeSendHeaders(function(data){ if (self.match(data.data, rule)) { var headers = data.data.requestHeaders; var obj = self.headersToObj(headers); var newH = self.parseHeader(rule.replace); obj = Fiddler.mix(obj, newH, true); headers = self.headersToArr(obj); data.data.requestHeaders = headers; return data.data; }; return false; }) }, parseHeader: function(string){ string = (string || "").split(";"); var headers = {}; string.forEach(function(item){ item = item.trim(); if (!item) { return false; }; item = item.split('='); var name = item[0].trim().toLowerCase(); name = name.substr(0, 1).toUpperCase() + name.substr(1); name = name.replace(/\-(\w)/ig, function(a, b) { return '-' + b.toUpperCase(); }); var value = item[1].trim(); if (!name) { return false; }; headers[name] = value; }) return headers; }, headersToObj: function(headers){ headers = headers || []; var result = {}; headers.forEach(function(item){ result[item.name] = item.value; }); return result; }, headersToArr: function(obj){ var headers = []; for(var name in obj){ headers.push({ name: name, value: obj[name] }); } return headers; }, /** * resource listening * @return {[type]} [description] */ resouceListening: function(force){ if (_isResouceListening && !force) { return false; }; _isResouceListening = true; var self = this; eventTypes.forEach(function(item){ self[item](function(data){ var detail = data.data; Fiddler_Resource.add(detail, item); return false; }) }); }, fileErrorListening: function(callback){ if (callback) { _fileErrorFn = callback }; this.on("fileError", _fileErrorFn); }, disableCacheRule: function(){ var self = this; var list = ["Cache-Control", "Pragma", "If-Modified-Since", "If-None-Match"]; var listData = ["no-cache", "no-cache", "", ""]; this.onBeforeSendHeaders(function(data){ var headers = data.data.requestHeaders; var obj = self.headersToObj(headers); var result = {}; for(var name in obj){ if (list.indexOf(name) > -1) { continue; }; result[name] = obj[name]; } list.forEach(function(item, i){ result[item] = listData[i]; }) headers = self.headersToArr(result); data.data.requestHeaders = headers; return data.data; }) }, userAgentRule: function(agent){ }, parseRule: function(rule){ var types = { "File": "addFileReplaceRule", "Path": "addDirReplaceRule", "Cancel": "addCancelRule", "Delay": "addDelayRule", "Redirect": "addUrlReplaceRule", "Header": "addHeaderRule" } rule.type = types[rule.replaceType]; return rule; }, addRule: function(rule){ var result = this.parseRule(rule); var type = result.type; if (this[type]) { Fiddler_Config.addRule(result); if (rule.enable) { this[type](result); }; }; }, saveRules: function(rules, enable){ var self = this; this.clearAll(); this.resouceListening(true); this.fileErrorListening(); if (!enable) { return this; }; Fiddler_Config.clearRules(); rules = rules || []; rules.forEach(function(item){ self.addRule(item); }); return this; } }) return rule; }(); ================================================ FILE: src/js/component.js ================================================ (function() { var srcPath = '../js/'; document.write('