fixes #1860
This commit is contained in:
@@ -467,6 +467,7 @@ Danbooru.Note = {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$("#image").css("cursor", "crosshair");
|
||||||
Danbooru.Note.TranslationMode.active = true;
|
Danbooru.Note.TranslationMode.active = true;
|
||||||
$(document.body).addClass("mode-translation");
|
$(document.body).addClass("mode-translation");
|
||||||
$("#original-file-link").click();
|
$("#original-file-link").click();
|
||||||
@@ -479,6 +480,7 @@ Danbooru.Note = {
|
|||||||
|
|
||||||
stop: function() {
|
stop: function() {
|
||||||
Danbooru.Note.TranslationMode.active = false;
|
Danbooru.Note.TranslationMode.active = false;
|
||||||
|
$("#image").css("cursor", "auto");
|
||||||
$("#image").unbind("mousedown", Danbooru.Note.TranslationMode.Drag.start);
|
$("#image").unbind("mousedown", Danbooru.Note.TranslationMode.Drag.start);
|
||||||
$(window).unbind("mouseup", Danbooru.Note.TranslationMode.Drag.stop);
|
$(window).unbind("mouseup", Danbooru.Note.TranslationMode.Drag.stop);
|
||||||
$(document.body).removeClass("mode-translation");
|
$(document.body).removeClass("mode-translation");
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ class ApplicationController < ActionController::Base
|
|||||||
before_filter :normalize_search
|
before_filter :normalize_search
|
||||||
before_filter :set_started_at_session
|
before_filter :set_started_at_session
|
||||||
before_filter :api_check
|
before_filter :api_check
|
||||||
|
before_filter :secure_cookies_check
|
||||||
layout "default"
|
layout "default"
|
||||||
|
|
||||||
rescue_from User::PrivilegeError, :with => :access_denied
|
rescue_from User::PrivilegeError, :with => :access_denied
|
||||||
@@ -102,4 +103,14 @@ protected
|
|||||||
params[:search] ||= {}
|
params[:search] ||= {}
|
||||||
end
|
end
|
||||||
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
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user