masakih

OSXを起動したらそこには『艦隊これくしょん -艦これ-』の世界が広がっていたのです!?

  • R/O
  • HTTP
  • SSH
  • HTTPS

提交

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

修訂b813e83f6546057a17ba8b7d8ae55235a1376593 (tree)
時間2015-07-10 21:46:37
作者masakih <masakih@user...>
Commitermasakih

Log Message

処理を変更

Change Summary

差異

--- a/KanColleBrowserForOSX/KCBFOMainWindowController.swift
+++ b/KanColleBrowserForOSX/KCBFOMainWindowController.swift
@@ -17,7 +17,6 @@ class KCBFOMainWindowController: NSWindowController {
1717 var flashTopLeft: NSPoint = NSMakePoint(2600, 145);
1818
1919 let gamePageURL = "http://www.dmm.com/netgame/social/-/gadgets/=/app_id=854854/"
20- let loginPageURLPrefix = "https://www.dmm.com/my/-/login/=/"
2120
2221 override class func new() -> KCBFOMainWindowController {
2322 return KCBFOMainWindowController(windowNibName: "KCBFOMainWindowController")
@@ -111,22 +110,21 @@ class KCBFOMainWindowController: NSWindowController {
111110 }
112111
113112 // MARK: - WebUIDelegate
113+ let ignoreTags = [WebMenuItemTagOpenLinkInNewWindow,
114+ WebMenuItemTagDownloadLinkToDisk,
115+ WebMenuItemTagOpenImageInNewWindow,
116+ WebMenuItemTagOpenFrameInNewWindow,
117+ WebMenuItemTagGoBack,
118+ WebMenuItemTagGoForward,
119+ WebMenuItemTagStop,
120+ WebMenuItemTagReload]
121+
114122 override func webView(sender: WebView!, contextMenuItemsForElement element: [NSObject : AnyObject]!, defaultMenuItems: [AnyObject]!) -> [AnyObject]! {
115- return defaultMenuItems.flatMap(){
116- item in
117- switch item.tag() {
118- case WebMenuItemTagOpenLinkInNewWindow,
119- WebMenuItemTagDownloadLinkToDisk,
120- WebMenuItemTagOpenImageInNewWindow,
121- WebMenuItemTagOpenFrameInNewWindow,
122- WebMenuItemTagGoBack,
123- WebMenuItemTagGoForward,
124- WebMenuItemTagStop,
125- WebMenuItemTagReload:
123+ return defaultMenuItems.flatMap() {
124+ if contains(ignoreTags, $0.tag()) {
126125 return []
127- default:
128- return [item]
129126 }
127+ return [$0]
130128 }
131129 }
132130 }