Permalink
Browse files

hide scroller surely

  • Loading branch information...
1 parent 90b3511 commit 007b151f14dc4ab98a0567d3abdd098d287d02c3 @psychs psychs committed Nov 3, 2011
Showing with 4 additions and 7 deletions.
  1. +0 −1 Classes/Views/Log/LogController.h
  2. +4 −6 Classes/Views/Log/LogController.m
@@ -22,7 +22,6 @@
LogPolicy* policy;
LogScriptEventSink* sink;
MarkedScroller* scroller;
- WebScriptObject* js;
WebViewAutoScroll* autoScroller;
IRCWorld* world;
@@ -68,7 +68,6 @@ - (void)dealloc
[policy release];
[sink release];
[scroller release];
- [js release];
[autoScroller release];
[menu release];
@@ -817,6 +816,7 @@ - (void)setUpScroller
if ([scrollView respondsToSelector:@selector(setAllowsHorizontalScrolling:)]) {
[(id)scrollView setAllowsHorizontalScrolling:NO];
}
+ [[view windowScriptObject] evaluateWebScript:@"document.body.style.overflowX='hidden';"];
NSScroller* old = [scrollView verticalScroller];
if (old && ![old isKindOfClass:[MarkedScroller class]]) {
@@ -838,9 +838,7 @@ - (void)setUpScroller
- (void)webView:(WebView *)sender didClearWindowObject:(WebScriptObject *)windowObject forFrame:(WebFrame *)frame
{
- [js release];
- js = [windowObject retain];
- [js setValue:sink forKey:@"app"];
+ [[view windowScriptObject] setValue:sink forKey:@"app"];
}
- (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame
@@ -945,11 +943,11 @@ - (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame
];
}
- [js evaluateWebScript:s];
+ [[view windowScriptObject] evaluateWebScript:s];
// evaluate theme js
if (theme.js.content.length) {
- [js evaluateWebScript:theme.js.content];
+ [[view windowScriptObject] evaluateWebScript:theme.js.content];
}
}

0 comments on commit 007b151

Please sign in to comment.