Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change line separator to \n #200

Merged
merged 2 commits into from
Jun 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 50 additions & 50 deletions js/viewportDetect.js
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
/*!
* viewportDetect Plugin
* v1.0 [jj 13Dec18]
*
* returns the current viewport ("xs", "sm", "md", or "lg")
* $.viewportDetect()
*
* create a callback function that is called whenever the viewport changes
* $.viewportDetect(function(currentViewport, previousViewport) { });
*/
$(document).ready(function () {
// create some unobtrusive dom that bootstrap will show and hide depending on its media queries
$("body").append("<div id=\"viewportDetect\"><div class=\"visible-xs\" data-viewport=\"xs\"></div><div class=\"visible-sm\" data-viewport=\"sm\"></div><div class=\"visible-md\" data-viewport=\"md\"></div><div class=\"visible-lg\" data-viewport=\"lg\"></div></div>");
/* examples
// simply log the current viewport size every two seconds
setInterval(function () {
console.log("interval: " + $.viewportDetect()); },
2000);
// a callback fn that gets called whenever the viewport changes
$.viewportDetect(function (vp, prevVp) {
console.log("onChange: " + prevVp + " -> " + vp);
});
*/
});
(function ($) {
var _currentViewport = "";
$.viewportDetect = function(onChange) {
if (arguments.length == 0) {
return $("#viewportDetect div:visible").data("viewport");
}
// onChange is a function we want to call whenever the viewport changes
$(window).resize(function () {
var viewport = $("#viewportDetect div:visible").data("viewport");
if (_currentViewport == "") _currentViewport = viewport; // the first change is not really a change at all
if (_currentViewport != viewport) {
var prevViewport = _currentViewport;
_currentViewport = viewport;
onChange(_currentViewport, prevViewport);
}
});
};
})(jQuery);
/*!
* viewportDetect Plugin
* v1.0 [jj 13Dec18]
*
* returns the current viewport ("xs", "sm", "md", or "lg")
* $.viewportDetect()
*
* create a callback function that is called whenever the viewport changes
* $.viewportDetect(function(currentViewport, previousViewport) { });
*/

$(document).ready(function () {
// create some unobtrusive dom that bootstrap will show and hide depending on its media queries
$("body").append("<div id=\"viewportDetect\"><div class=\"visible-xs\" data-viewport=\"xs\"></div><div class=\"visible-sm\" data-viewport=\"sm\"></div><div class=\"visible-md\" data-viewport=\"md\"></div><div class=\"visible-lg\" data-viewport=\"lg\"></div></div>");

/* examples
// simply log the current viewport size every two seconds
setInterval(function () {
console.log("interval: " + $.viewportDetect()); },
2000);

// a callback fn that gets called whenever the viewport changes
$.viewportDetect(function (vp, prevVp) {
console.log("onChange: " + prevVp + " -> " + vp);
});
*/
});

(function ($) {
var _currentViewport = "";

$.viewportDetect = function(onChange) {
if (arguments.length == 0) {
return $("#viewportDetect div:visible").data("viewport");
}

// onChange is a function we want to call whenever the viewport changes
$(window).resize(function () {
var viewport = $("#viewportDetect div:visible").data("viewport");
if (_currentViewport == "") _currentViewport = viewport; // the first change is not really a change at all

if (_currentViewport != viewport) {
var prevViewport = _currentViewport;
_currentViewport = viewport;
onChange(_currentViewport, prevViewport);
}
});
};

})(jQuery);
Binary file modified languages/de_DE/LC_MESSAGES/messages.mo
Binary file not shown.
Binary file modified languages/en_US/LC_MESSAGES/messages.mo
Binary file not shown.
Binary file modified languages/sk_SK/LC_MESSAGES/messages.mo
Binary file not shown.