This commit is contained in:
r888888888
2013-07-16 17:04:42 -07:00
parent 412c9ad122
commit b1933dc363
2 changed files with 13 additions and 0 deletions

View File

@@ -467,6 +467,7 @@ Danbooru.Note = {
return;
}
$("#image").css("cursor", "crosshair");
Danbooru.Note.TranslationMode.active = true;
$(document.body).addClass("mode-translation");
$("#original-file-link").click();
@@ -479,6 +480,7 @@ Danbooru.Note = {
stop: function() {
Danbooru.Note.TranslationMode.active = false;
$("#image").css("cursor", "auto");
$("#image").unbind("mousedown", Danbooru.Note.TranslationMode.Drag.start);
$(window).unbind("mouseup", Danbooru.Note.TranslationMode.Drag.stop);
$(document.body).removeClass("mode-translation");

View File

@@ -8,6 +8,7 @@ class ApplicationController < ActionController::Base
before_filter :normalize_search
before_filter :set_started_at_session
before_filter :api_check
before_filter :secure_cookies_check
layout "default"
rescue_from User::PrivilegeError, :with => :access_denied
@@ -102,4 +103,14 @@ protected
params[:search] ||= {}
end
end
def secure_cookies_check
if true || request.ssl?
Danbooru::Application.config.session_store :cookie_store, :key => '_danbooru_session', :secure => true
else
Danbooru::Application.config.session_store :cookie_store, :key => '_danbooru_session', :secure => false
end
ap cookies
true
end
end