Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2049)

Unified Diff: Source/devtools/front_end/workspace/UISourceCode.js

Issue 1360943002: Devtools: Extensible mime typing, mime typing by file name (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/workspace/UISourceCode.js
diff --git a/Source/devtools/front_end/workspace/UISourceCode.js b/Source/devtools/front_end/workspace/UISourceCode.js
index 5c6597aff3557b60b93be09f899abedd25f386cc..379b2c3d4912d5b142477baac1b123ad598da153 100644
--- a/Source/devtools/front_end/workspace/UISourceCode.js
+++ b/Source/devtools/front_end/workspace/UISourceCode.js
@@ -523,12 +523,7 @@ WebInspector.UISourceCode.prototype = {
*/
extension: function()
{
- var lastIndexOfDot = this._name.lastIndexOf(".");
- var extension = lastIndexOfDot !== -1 ? this._name.substr(lastIndexOfDot + 1) : "";
- var indexOfQuestionMark = extension.indexOf("?");
- if (indexOfQuestionMark !== -1)
- extension = extension.substr(0, indexOfQuestionMark);
- return extension;
+ return WebInspector.TextUtils.extension(this._name);
},
/**

Powered by Google App Engine
This is Rietveld 408576698